How to get selected radio button text in datalist ?
<p>In below data list represents set of question's and answer, How to check whether the user selected right answer radio button or not when the user clicks on submit button using javascript ? </p>

<p>the answer is stored in database.</p>

<p>Datalist:</p>

<pre><code>&lt;asp:DataList ID="DataList1" runat="server" DataKeyField="Qno" 
        DataSourceID="SqlDataSource1"&gt;
        &lt;ItemTemplate&gt;
            Qno:
            &lt;asp:Label ID="QnoLabel" runat="server" Text='&lt;%# Eval("Qno") %&gt;' /&gt;
            &lt;br /&gt;
            Question:
            &lt;asp:Label ID="QuestionLabel" runat="server" Text='&lt;%# Eval("Question") %&gt;' /&gt;
            &lt;br /&gt;
            &lt;asp:RadioButton ID="RadioButton1" runat="server" Text='&lt;%# Eval("Ans1") %&gt;' /&gt;
            &lt;br /&gt;
            &lt;asp:RadioButton ID="RadioButton2" runat="server" Text='&lt;%# Eval("Ans2") %&gt;' /&gt;
            &lt;br /&gt;
            &lt;asp:RadioButton ID="RadioButton3" runat="server" Text='&lt;%# Eval("Ans3") %&gt;' /&gt;
            &lt;br /&gt;
            &lt;asp:RadioButton ID="RadioButton4" runat="server" Text='&lt;%# Eval("Ans4") %&gt;' /&gt;
            &lt;br /&gt;
            &lt;asp:Button ID="Button2" runat="server" Text="Submit" /&gt;
            &lt;br /&gt;
        &lt;/ItemTemplate&gt;
    &lt;/asp:DataList&gt;
</code></pre>
