Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8615151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:18:13+00:00 2026-06-12T05:18:13+00:00

I have a radibutton list. <asp:RadioButtonList ID=RadioButtonList1 runat=server RepeatDirection=Horizontal RepeatLayout=flow > <asp:ListItem Selected=True Text

  • 0

I have a radibutton list.

          <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
              RepeatDirection="Horizontal" RepeatLayout="flow" >
             <asp:ListItem Selected="True" Text ="Yes" Value="0"></asp:ListItem>
             <asp:ListItem  Text ="No" Value="1"></asp:ListItem>
          </asp:RadioButtonList>

And to get the value from radio list I have a function :

 function getvalueofradiolist() {

        var radiolist = document.getElementById('<%= RadioButtonList1.ClientID %>');
        var rblName = radiolist.name;
        var radio = document.getElementsByName(rblName);

        for (var x = 0; x < radio.length; x++) {
            if (radio[x].checked) {
                alert("Selected item Value " + radio[x].value);
            }
        }
    }

But it returns undefined.

Did I write something wrong?

I am calling this function on button click.

Suggest me If I can do this with the help of code behind in spite of Javascript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:18:14+00:00Added an answer on June 12, 2026 at 5:18 am
    <form runat="server">
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
              RepeatDirection="Horizontal" RepeatLayout="flow" >
             <asp:ListItem Selected="True" Text ="Yes" Value="0"></asp:ListItem>
             <asp:ListItem  Text ="No" Value="1"></asp:ListItem>
          </asp:RadioButtonList>    </form>
    <p id="button" onclick="getvalue()">click me</p>
    
    <script type="text/javascript">
    function getvalue(){
     alert($('#<%=RadioButtonList1.ClientID %> input[type=radio]:checked').val());
    }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

update question: <asp:radiobuttonlist runat=server id=rbl repeatdirection=Horizontal> <asp:listitem text=None value=0 selected=True enabled=true/> <asp:listitem text=Float Left
I have this code: <asp:RadioButtonList ID=rblExpDate runat=server > <asp:ListItem Selected=True Text=No expiration date></asp:ListItem> <asp:ListItem
i have a question: <div> Is hacking good?</div> <div> <asp:RadioButtonList ID=1question runat=server RepeatDirection=Horizontal> <asp:ListItem
<tr step=step2 optional=true><td>Gender</td></tr> <tr step=step2 optional=true> <td> <asp:RadioButtonList ID=rblGender runat=server RepeatDirection=Horizontal> <asp:ListItem Text=Female Value=0></asp:ListItem>
i have: <asp:TemplateField HeaderText=Choose Option> <ItemTemplate> <asp:RadioButtonList ID=rdbChoice runat=server RepeatDirection=Horizontal> <asp:ListItem Value=A>A</asp:ListItem> <asp:ListItem Value=B>B</asp:ListItem>
I have this code <asp:RadioButtonList ID=rblSplitWeek runat=server> <asp:ListItem selected=true>No Choice</asp:ListItem> <asp:ListItem Text = First
I have the following: <asp:RadioButtonList ID=rbIsRep runat=server RepeatDirection=horizontal > <asp:ListItem Value=1 >Yes</asp:ListItem> <asp:ListItem Value=0
I have the following in vb.net <asp:RadioButtonList ID=rbEdit5 runat=server RepeatDirection=horizontal > <asp:ListItem Value=1 >Yes</asp:ListItem>
I have the following radion button in VB.NET <asp:RadioButtonList ID=rbedit runat=server RepeatDirection=horizontal > <asp:ListItem
I have a RadioButtonList with two ListItems included: <asp:RadioButtonList runat=server ID=optRollover OnSelectedIndexChanged=RolloverOptionSelected AutoPostBack=true> <asp:ListItem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.