Groups | Blog | Home
all groups > asp.net webcontrols > may 2005 >

asp.net webcontrols : Get state of Dynamically generated controls on post back


Amelyan
5/12/2005 1:38:59 PM
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

Josh
5/13/2005 12:00:00 AM
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

Fred Hirschfeld
5/14/2005 12:44:13 AM
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

[quoted text, click to view]

AddThis Social Bookmark Button