With partial page updates it becomes more feasible to create pages with no viewstate, however this requires a bit trickier coding. I have a DropDownList control that I need to rebind every time I am refreshing the UpdatePanel that contains it. The first thought is to put the binding process in the event handler of the item that caused the partial postback. However, since this occurs in the pipeline after the DropDown's selected value is applied, the selected value is lost. Thus the binding of the DropDown has to happen in the Page_Init stage. But at this stage I don't have the event yet unless you examine the raw posted data (ugly). It would be nice if the ScriptManager could be interogated on post back to tell us which UpdatePanel caused the partial post. Then in the Page_Init I can say "If the UpdatePanel doing the posting contains my DropDown then do the binding". I have not seen any way to get a reference of the UpdatePanel that contains the control that triggered the partial post back. If it exists I would like to know.
View Complete Post