Get state of Dynamically generated controls on post back

A

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
 
J

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
 
F

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top