I have a RadioButtonList with 2 listitems. The value of the two list items is true and false.
I've a boolean value called Daily. Daily is set to 'false'
Here's the code snippet:
<asp:RadioButtonList runat="server" ID="pfRadioButtonList" SelectedValue="<%# Model.Daily.ToString() %>" AutoPostBack="True" OnSelectedIndexChanged="PFRadioButtonList_OnSelectedIndexChanged">
<asp:ListItem Text="Item 1" Value="false"></asp:ListItem>
<asp:ListItem Text="Item 2" Value="true"></asp:ListItem>
</asp:RadioButtonList>
The problem is on running I get the follwing error: 'pfRadioButtonList' has a selectedvalue which is invalid because it does not exist in the list of items.
Any suggestions anyone please?!