I have a radiobutton list on my form like so:
<asp:RadioButtonList id="rdbNameChange" runat="server" CssClass="radioButtonList" RepeatDirection="Vertical" EnableViewState="true">
<asp:listitem Text="Yes" Value="Y"></asp:listitem>
<asp:listitem Text="No" Value="N"></asp:listitem>
</asp:RadioButtonList></span>
I have a validator on the form too that validates whether the radio button is checked or not.
<asp:RequiredFieldValidator Display="None" ID="reqRdbList" runat="server" ErrorMessage="reuired" ForeColor="Red" ControlToValidate="rdbNameChange" ></asp:RequiredFieldValidator>
Validation message is firing when user comes first time on this form, but when user leaves this page and comes back to this page again using the previous button then validator does not fire and lets the user pass this page without checking the validation. This is only happening for radio buttons. I have other text boxes on my page, but radio buttons are having this issue.
Previous button on the next page is like so:
<a data-role="button" data-inline="true" id="btnPrevious" data-theme="a" data-icon="arrow-l" href='javascript:history.go(-1)'>Previous</a>
As soon as the user click on previous page, radiobutton loses its value and validator also does not fire if user does not select any value from radio button list. How can I fix this issue?
Any help will be appreciated.