Dynamic control values
1 answer
Presumably you are talking about ASP.NET? Are you trying to get the value in the code behind or client side using Javascript?
If its server side and yours are <asp:Panel>
declared on the page, you can do ...
foreach(Control c in myPanel.Controls)
{
if(c.GetType() == typeof(TextBox))
{
TextBox tb = c as TextBox;
if(tb.ID == "The ID Your Looking For")
{
//Do stuff with tb.Text;
}
}
}
0
a source to share