Home All Groups Group Topic Archive Search About

Get state of Dynamically generated controls on post back

Author
12 May 2005 6:38 PM
Amelyan
How can I get state of dynamically generated controls (RadioButton,
CheckBox, TextBox.Text) on post back when I click submit button?

The only way I know is by traversing Response.Form enumberator;
Response.Form.GetEnumerator(), etc.

However, I am not sure if that is the proper way.

Thanks,
-Amelyan

Author
13 May 2005 8:38 AM
Josh
Reload the dynamic controls in the page_load, thier viewstate will be
installed into them and you can access it from the event that caused the
postback
Author
14 May 2005 7:44 AM
Fred Hirschfeld
In my custom User Control, I am creating an event handler for the dynamic
control's ServerChange event so that when it changes, I can do something.
The sender object will be the object you need to access its state or value.

Fred

Show quoteHide quote
"Amelyan" <bamel***@wi.rr.com> wrote in message
news:%235IseHyVFHA.3572@TK2MSFTNGP12.phx.gbl...
> How can I get state of dynamically generated controls (RadioButton,
> CheckBox, TextBox.Text) on post back when I click submit button?
>
> The only way I know is by traversing Response.Form enumberator;
> Response.Form.GetEnumerator(), etc.
>
> However, I am not sure if that is the proper way.
>
> Thanks,
> -Amelyan
>