Hi all,
I am new to AJAX and this is my first port.
In my requirement i need to create set of dynamic controls (multiple instances of a custom webcontrol) to do this i am following the below steps.
- I have a user control with update panel in it
- I have a button "Add" to add new instance.
- Hidden field count to check number of dynamic instances added
- Hidden field to keep track of dynamic id's
- Remove button to remove the instance
- Handle UpdatePanel Load event to load the previous instance of controls before the control renders
- I have custom web control which inherits the ASP:Table class
- I override CreateChildControls method to create controls set
- Hidden field to maintain the disabled control ids
rendering dynamic controls and its viewstate is working fine.
I am facing problem here.
I have some business logic in which the if the user selects "Yes" as the option in a RadioButtonList i am disabling few controls in the dynamically rendered sets at clientside. How to I get the controls state in the CreateChildControl method to see what was the control state using the hidden field as i am not able to get the form Posted values at this time. (Note: I know that we can use the UniqueID of the hidden field, but this will not work here as the unique id will be still the control ID unique id will be different when it renders.
So i want to know how to manage the viewstate from client and server in this scenario?
I tried to put in words as simple as possible.
Thanks for the help
- Satish