viewstate lost if dropdownlist databound
Can anyone explain why a dropdownlist is only able to manage its viewstate if the items are hardcoded? I set the dropdownlist's onSelectedIndexChanged event to a simple handler that sets a label to the selected value. Of course it is only bound if it's not a postback. There is nothing else on the page.
After an item is selected, the page reloads and the ddl is empty. If I then hit the back button, it shows my page with the item I selected in the ddl visible, but the label is not set, showing the handler was never called.
Can anyone think of any reason in the world why the handler would not be called?
|