|
-
Sep 6th, 2012, 07:46 AM
#1
Thread Starter
Frenzied Member
Retrieving Textbox text server side.
Ok I'm adding <ASP:TextBox>'s to a page in code.
I'm going to set their ID and stuff like that.
I'm wanting to retrieve the text of those textboxes on a button press.
Now I know I can't simply do "Me.MyTBName1.Text". I guess I could loop through
the controls and compare IDs. I'd rather be able to get the textbox's text directly somehow though.
I could use Javascript to get the value, but I don't think I can use it server-side at that point.
How would I go about doing this?
-
Sep 7th, 2012, 02:41 PM
#2
Re: Retrieving Textbox text server side.
Why can't you use Me.txbHello.Text? That works just fine.
If you use this in a databound control (datarepeater or so) you can you item.FindControl("txbHello")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|