M
mavrick101
Hi,
I have a webform which has 4 panels.
Each panel would have about 20 textboxes and dropdown boxes. I have named
the controls like
Panel1:
_textboxP1T1;
_textboxP1T2;
......
similarly
_listP1L1;
so goes for other Panels, 2, 3 and 4.
On page submit, I get the values in those textboxes like this....
for (int i=1;i<=20;i++)
{
Textbox tempBox = (TextBox) Page.FindControl("_textboxP1T" +
i.ToString());
if (tempBox != null)
{
.........
}
}
My question is, is it the only way? Is there a way similar to 'eval' in
Javascript?
so I can just grab the value of the text box like
eval("_textboxP1T" + i.ToString).Text....
Any one???
I have a webform which has 4 panels.
Each panel would have about 20 textboxes and dropdown boxes. I have named
the controls like
Panel1:
_textboxP1T1;
_textboxP1T2;
......
similarly
_listP1L1;
so goes for other Panels, 2, 3 and 4.
On page submit, I get the values in those textboxes like this....
for (int i=1;i<=20;i++)
{
Textbox tempBox = (TextBox) Page.FindControl("_textboxP1T" +
i.ToString());
if (tempBox != null)
{
.........
}
}
My question is, is it the only way? Is there a way similar to 'eval' in
Javascript?
so I can just grab the value of the text box like
eval("_textboxP1T" + i.ToString).Text....
Any one???