I have a tabbed menu and because I have a RequiredFieldValidator attached to my quiz questions, they have to be answered before leaving the page. Is there a way to limit validation to, say, the Panel containing the quiz so that I can still navigate away?
Here's a sample of my quiz thing. When the button is hit, the panel will swap with the answers panel. But to even navigate away from the page with other links that aren't the button, it requires validation. Is there a better Validate control for this?
<asp:Panel id="Panel1" width="600" runat="server"> <h3> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadioButtonList1" ErrorMessage="* "></asp:RequiredFieldValidator>Question 1h3> <asp:RadioButtonList ID="RadioButtonList1" runat="server"> <asp:ListItem>Ans 1</asp:ListItem> <asp:ListItem>Ans 2</asp:ListItem> <asp:ListItem>Ans 3</asp:ListItem> <asp:ListItem>Ans 4</asp:ListItem> </asp:RadioButtonList> <h3> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="RadioButtonList2" ErrorMessage="* "></asp:RequiredFieldValidator>Question 2</h3> <asp:RadioButtonList ID="RadioButtonList2" runat="server"> <asp:ListItem>Ans 1</asp:ListItem> <asp:ListItem>Ans 2</asp:ListItem> <asp:ListItem>Ans 3</asp:ListItem> <asp:ListItem>Ans 4</asp:ListItem> </asp:RadioButtonList> <asp:Button onclick="checkAns" ID="Button1" runat="server" Text="Grade It" /> </asp:Panel>

New Topic/Question
Reply




MultiQuote



|