M
Melissa
Hi all,
I need help on reading input value from dynamic created input controls. What
is the control ID to use after input is posted back to the server? My code
below does not get anything although the input values were displayed
correctly in the Textbox on the screen after posted back.
Thanks in advanced!
Here is the sample code:
if (!IsPostBack)
{
TextBox oTextBox;
for (int i=0; i<5; i++)
{
oTextBox = new TextBox();
oTextBox.ID = "test" + i.ToString();
Form.Contronls.Add(oTextBox);
}
}
else
{
for (int i=0; i<5; i++)
{
// Request Does NOT find these fields???
Response.Write(Request["test" + i.ToString()].ToString());
}
}
I need help on reading input value from dynamic created input controls. What
is the control ID to use after input is posted back to the server? My code
below does not get anything although the input values were displayed
correctly in the Textbox on the screen after posted back.
Thanks in advanced!
Here is the sample code:
if (!IsPostBack)
{
TextBox oTextBox;
for (int i=0; i<5; i++)
{
oTextBox = new TextBox();
oTextBox.ID = "test" + i.ToString();
Form.Contronls.Add(oTextBox);
}
}
else
{
for (int i=0; i<5; i++)
{
// Request Does NOT find these fields???
Response.Write(Request["test" + i.ToString()].ToString());
}
}