DropDownList is empty on PostBack triggered by Update

S

samvayn

I have Custom Control derived from the DropDownList. It has preloaded
data and meant to be re-used in FromView's and other controls. If I
issue postback by, say, stand-alone button - then this custom
DropDownList retains both - data in a drop-down portion and selected
value. However, if the postback is issued by Update command of the
FormView - then control is empty. The same control outside the
FormView behaves just find on either call.
At this point it is not even bound to anything - simply placed inside
the ItemEdit template and is manually loaded with List Items. I do see
that OnLoad() is called twice when Update command is used - first
time control has Items collection populated (from the ViewState, I
assume) and second time it is empty.

Any help would be highly appreciated.


Sam
 

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

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,335
Latest member
Tommiesal

Latest Threads

Top