Listcontrol on placeholder does not maintain state

C

chak

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.
 
R

R

If you are creating controls at runtime you need to do so in LoadViewState
otherwise the events will not get hooked up.

R
 

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

Top