I have a set of radio buttons used to let users select either Std or Metric scale. It is supposed to set the value in the users profile. However on selected value changed
(from "i" to "m") it sees the value as "i'" - the prior selection and changes the radio button back to the original setting?
<asp:UpdatePanel runat="server" ID="updatescale" ChildrenAsTriggers="false" UpdateMode="Conditional"><ContentTemplate><asp:Panel ID="Panel5" runat="server" Height="50" CssClass="gainsPanel" Style="margin-top: 8px; width: 330; margin-left: -3px"><div style="float: left; margin-left: inherit;"><asp:Label ID="Label3" runat="server" Text="Preferred Scale:"></asp:Label></div><div style="float: left;"><asp:RadioButtonList ID="rblscale" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="rblscale_SelectedIndexChanged" ><asp:ListItem Value="I" Selected="True">US Std (Imperial)</asp:ListItem><asp:ListItem Value="M">Metric</asp:ListItem></asp:RadioButtonList></div></asp:Panel></ContentTemplate></asp:UpdatePanel>
protected void rblscale_SelectedIndexChanged(object sender, EventArgs e) { string scaleset = rblscale.SelectedValue; Profile.scale = scaleset; ddlunit.SelectedValue = Profile.scale; updatescale.Update(); }