By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,154 Members | 1,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,154 IT Pros & Developers. It's quick & easy.

Listcontrol on placeholder does not maintain state

P: n/a
I have developed a form which dynamically builds textbox, radiobuttonlist,
checkboxlist controls from parameters in a table, and somehow manages to
maintain state (of data keyed in by user). However, the listbox that i
invoke on click of a help button does not maintain state (i am not
re-loading the list on postback , which is a usual problem). Does anybody
have any idea what could be the issue ? The only asp control i have defined
in the aspx page is the placeholder. All controls are being placed
dynamically on this placeholder. Only the listbox fails to maintain state,
though there is a autopostback = true on 'selectedindexchanged' event.

Thanks.


Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
R
If you are creating controls at runtime you need to do so in LoadViewState
otherwise the events will not get hooked up.

R
"chak" <r_************@hotmail.com> wrote in message
news:#Y**************@TK2MSFTNGP10.phx.gbl...
I have developed a form which dynamically builds textbox, radiobuttonlist,
checkboxlist controls from parameters in a table, and somehow manages to
maintain state (of data keyed in by user). However, the listbox that i
invoke on click of a help button does not maintain state (i am not
re-loading the list on postback , which is a usual problem). Does anybody
have any idea what could be the issue ? The only asp control i have defined in the aspx page is the placeholder. All controls are being placed
dynamically on this placeholder. Only the listbox fails to maintain state,
though there is a autopostback = true on 'selectedindexchanged' event.

Thanks.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.