Within the dataset below, there is a collection of questions and answers. How can you use JavaScript to verify if the user has selected the correct answer radio button before clicking the submit button?
The answers are stored in a database.
Data List:
<asp:DataList ID="DataList1" runat="server" DataKeyField="Qno"
DataSourceID="SqlDataSource1">
<ItemTemplate>
Qno:
<asp:Label ID="QnoLabel" runat="server" Text='<%# Eval("Qno") %>' />
<br />
Question:
<asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
<br />
<asp:RadioButton ID="RadioButton1" runat="server" Text='<%# Eval("Ans1") %>' />
<br />
<asp:RadioButton ID="RadioButton2" runat="server" Text='<%# Eval("Ans2") %>' />
<br />
<asp:RadioButton ID="RadioButton3" runat="server" Text='<%# Eval("Ans3") %>' />
<br />
<asp:RadioButton ID="RadioButton4" runat="server" Text='<%# Eval("Ans4") %>' />
<br />
<asp:Button ID="Button2" runat="server" Text="Submit" />
<br />
</ItemTemplate>
</asp:DataList>