Skip to content Skip to sidebar Skip to footer

How to get the selected value from asp radio button list?

Usually, someone checking all the radio button(checked or not) one by one and get the selected radio button value. But we can get the radio button value in a single line using jquery.

Example
asp Radio button

   <asp:RadioButtonList ID="Rbtn_ModeSetBy" runat="server">
        <asp:ListItem Value="0">All Employees</asp:ListItem>
        <asp:ListItem Value="1">Grade</asp:ListItem>
        <asp:ListItem Value="2">Job Title</asp:ListItem>
        <asp:ListItem Value="3">Employment Status</asp:ListItem>
   </asp:RadioButtonList>

jQuery Code

   var val =$('[id*="<%=Rbtn_ModeSetBy.ClientID%>"]').find('input:checked').val();

Post a Comment for "How to get the selected value from asp radio button list?"