It stores and hooks Control State events, so everything happens at the right time automatically.
If you do you'll find that the Selected Index Changed event fires as well…"And here is the bug report about this in ms connect: Studio/feedback/View Feedback.aspx?
Feedback ID=103844This is 3 years old bug (closed "by design"), which is still in vs 2008 :( Backward compatibility is no excuse for leaving a fairly significany bug in the system.
My Page_Load code is nearly identically to Ricks in terms of binding to an object data source.
In my ASPX file, I have the following additional code: Now the Drop Down List control acts like a Text Box control when the View State is off.
I still find it hard to believe that we are x years into development and we don't have a) a dropdownlist that functions correctly with viewstate is disabled and b) a radio-button that works correctly inside a repeater.
Calenders, trees etc are all well and good but the team should really get the basics working first!
You still need to remember to stick the databinding code into the On Init() of the page so that the list is filled with data prior to View State/Control State unbinding but otherwise nothing else needs to happen.
Now if you were using View State none of this would have to happen.
NET 2.0 this particular issue could have been easily fixed by putting the Selected Value(s) into Control State so it always gets stored. I'm not sure how that could be handled if View State is of, short of implementating a custom listbox control that implements controlstate for the Selected Value property.
And it won't work if View State is off completely on the page.
The delay is proportionate to the size of the listboxes; upwards to 10,000 items causes the browser to freeze for well over a minute before working again. Selected Value = thesection End With End Sub Public Function Replace Null(By Val _value As Object) As String If _value Is DBNull. I changed the ID to 'button1', and then everything on my page works. Check all your ID's to make sure they are not ID="submit" as it will prevent any of your dropdowns from calling postback to the server.