Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RadioButtonList Does not maintain State
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00946741
Message ID:
00947072
Views:
17
Anyway, I found the problem.

The problem is with IE layering and .NET viewstate combined with the way the IDE uses absolute positioning to arrange tables and User Controls. If a control placed below another User Control with say, a checkboxlist wrapped in a DIV tag. IE will sometimes show the control underneath the checkboxlist but it won't respond at runtime. For example I had some checkboxes in the past that would highlight on mouseover but would not react to a button click. But after moving the checkbox away from the bottom of a user control with a checkboxlist, the problem went away.

The same thing is happening here but a bit different. It seems when I moved the radiobuttonlists above not below the User Controls in question, the viewstate is maintained and behavior is normal. I can only assume that when the rad buttons are below a User Control with a DIV contained checkboxlist the layering "hides" the radio buttons from the code that captures viewstate, so, since there is no viewstate information for the control, it initializes to the design time state.




>I have a web page that consists of several User Controls. Each of these have controls that require being bound to a DataSet.
>
>I also have two radiobuttonlists that are not bound to any data and are set at design time to a specific selection. Autopostback is set to false on the radionbuttonlists since nothing is to occur when a user is selecting one or another value. I don't want a postback which is usually the case with radio button groups. (I'm not sure why 90% of the examples describe responding to radio button click events when that is not standard behavior for a radio button group in web or winform application. Typically, they are there to set logic to be acted upon later.)
>
>Anyway, on a postback, the two radiobuttonlists on this page always revert to the design time selections. This does not happen on pages that do not host user controls with bound controls in them.
>
>How do I stop the radiobuttonlists from changing on a postback? Under no circumstances should the radionbutton selections change other than through user interaction.
>
>Please, this is extremely irritating.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform