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?
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")