Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2007, 07:43 AM
Authorized User
 
Join Date: Mar 2007
Location: ahmedabad, gujarat, India.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default placeholder controls

Deal all,

im generating textbox control dynamically at run time and place it on placeholder control....
now i want to insert some text into that textbox and update that text to database....

how can i do this???

Please help me...

  #2 (permalink)  
Old May 17th, 2007, 07:51 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Loop through the placeholders Control collection:

VB
For Each ctrl as Control in Placeholder.Controls
  If TypeOf ctrl is TextBox then
     Dim txt as TextBox = CType(ctrl, TextBox)
     txt.Text = "foo"
  End If
Next

C#
foreach(Control ctrl in Placeholder.Controls)
{
   if(ctrl is TextBox)
   {
      TextBox txt = (TextBox)ctrl;
      txt.Text = "foo";
   }
}

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
  #3 (permalink)  
Old May 17th, 2007, 07:58 AM
Authorized User
 
Join Date: Mar 2007
Location: ahmedabad, gujarat, India.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i can insert text into text box....

but i cant use that text for inserting it to database with insert quary....

suppose im inserting text: hello world
now i want to insert that text to database...

how can i get that text for further use??

  #4 (permalink)  
Old May 17th, 2007, 08:11 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I don't understand what you mean. The methods i provided above will let you write values to the text box, so, if you want to READ values from the text box you would just change the method around:

string foo = txt.Text;
Dim foo as String = txt.Text;

Then you just send that data to your database methods.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Placeholder grstad ASP.NET 2.0 Basics 6 May 23rd, 2008 09:03 AM
Navigate away from a Content Placeholder slbibs SharePoint Development 0 September 4th, 2007 03:28 PM
Can we add same gridview in Placeholder Control KamalRaturi ASP.NET 2.0 Professional 2 November 10th, 2006 10:07 AM
placeholder controls -- pulling data Fubar ASP.NET 1.0 and 1.1 Professional 6 September 8th, 2005 09:08 AM
Problems with placeholder and textboxes sean ASP.NET 1.0 and 1.1 Professional 0 January 13th, 2004 11:49 AM



All times are GMT -4. The time now is 11:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.