↧
Maybe I'll embed some debugouts in the the control code and see if I can figure out what's up.
The issue most likely is that when you are in Postback mode the SelectedValue is automatically set from the POST data or when you call DataBind and you have a databinding expression attached the value will be set with DataBind() is called. If you set the value before either of these actions the value explicitly set is lost. Typically this means you shouldn't programmatically assign the value before OnLoad() or before you do an explicit DataBind.
The best rule of thumb is to set control values that are also databound or receive POST data as late as possible - this means typically in Event Code or OnPreRender().
+++ Rick ---
--stein