I have a RadioButtonList in an UpdatePanel.
Say I click the second button (value of "1"). It posts back, and hits my event handler --
- I can watch the POST go out in Firebug, and it is clearly sending the correct form value of "1"
- I can catch the event handler with a breakpoint, and check Request.Form and clearly see that the incoming value is a "1"
However, the SelectedValue of the control (StatusButtons.SelectedValue) is always "0" (actually, it's whatever it was when the page originally loaded -- this is usually "0").
Is there some other way I should be getting the value selected in the RadioButtonList?
<asp:UpdatePanel runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:RadioButtonList OnSelectedIndexChanged="StatusButtons_OnSelectedIndexChanged" RepeatDirection="Horizontal" AutoPostBack="true" ID="StatusButtons" runat="server">
<asp:ListItem Value="0">Foo</asp:ListItem>
<asp:ListItem Value="1">Bar</asp:ListItem>
<asp:ListItem Value="2">Baz</asp:ListItem>
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>