I'm having a bit of an issue here.
I have a set of dynamically-created (IE: by code) controls on my web page. Depending on which options the user decides to go (Edit/New), those controls are re-created with the appropriate information (IE: "with values" with Edit, "without values" with New).
Here's the situation:
- I create my controls in InitComplete when it comes to save the data (both on Edit/New) contained within the controls.
- I create my controls in PreLoad when it comes to load them initially (Both on Edit/New) in order to avoid the ViewState to kick in.
However, despite creating the controls after the ViewState has been applied (technically), the controls still somehow retain the pre-postback's information. IE: if I have options 2 and 4 selected and I choose "New", which should show the options without being selected, they remain selected no matter what.
And this is true despite changing their values in the PreLoad state. From my understanding, creating a control in this fashion and at that point in the page lifecycle should override any values the ViewState might have had for those controls.
I have also tried to disable the parent's control viewstate (Table.EnableViewState = false) again, to no avail.
I've tried using the Me.ViewState.cl
View Complete Post