I notice that a dropdownlist loses its selectedindex after a databind call from code. Whereas a gridview control retains its selectedindex. Isn't this kind of inconsistent?
A workaround for the dropdownlist to maintain the selectedindex on databind is to store it in a variable and restore it afterwards, but then you might get an error if this index doesn't exist anymore. I wonder if there is a better way.