G
Graham Stevenson
Hi,
I am trying to create a webpart with a dropdownlist (MS
say it is the same as an asp.net server control).
All works fine except that the ddlist does NOT maintain
its viewstate (I have set EnableViewState = true).
Controls are all being created in CreateChildControls
override (as recommended), and other controls (Textboxes,
checkbox) retrieve their viewstate correctly at the end
of CreateChildControls during the postback, but the
ddlist is always empty, and I can never get a slecteditem.
Looking at the generated page - the __Viewstate entry is
the same if ddlist enableviewstate is true or false -
hence its not getting sent to the browser.
What simple trick am I missing here ??.
Many Thanks
I am trying to create a webpart with a dropdownlist (MS
say it is the same as an asp.net server control).
All works fine except that the ddlist does NOT maintain
its viewstate (I have set EnableViewState = true).
Controls are all being created in CreateChildControls
override (as recommended), and other controls (Textboxes,
checkbox) retrieve their viewstate correctly at the end
of CreateChildControls during the postback, but the
ddlist is always empty, and I can never get a slecteditem.
Looking at the generated page - the __Viewstate entry is
the same if ddlist enableviewstate is true or false -
hence its not getting sent to the browser.
What simple trick am I missing here ??.
Many Thanks