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

  • SEARCH
  • Home
  • 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 9057323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:25:33+00:00 2026-06-16T14:25:33+00:00

I am learning jquery and can’t seem to find what I need to get

  • 0

I am learning jquery and can’t seem to find what I need to get the value of the selected radio button from a radio button list in asp.net radiobuttonlist.

Here is the markup;

 <fieldset style="width:50%;">
        <legend>Select one option below</legend>
        <div id="radioContactTasks">
            <asp:RadioButtonList ID="rblAddEditContact" runat="server"
                         RepeatDirection="Vertical" 
                         CssClass="registerradio" TextAlign="Left">
                <asp:ListItem Text="Add New Contact" />
                <asp:ListItem Text="Edit Existing Contact" />
                <asp:ListItem Text="Delete Existing Contact" />
            </asp:RadioButtonList>
        </div>
    </fieldset>

I’ve tried various methods, none work. Here is the latest variation to just alert me what was selected.

$(document).ready(function () {
        $("#rblAddEditContact").on("change", ":radio", function () {
            alert($(this).siblings("label").value);
        });
    });

Here is the rendered html

<fieldset style="width:45%;">
    <legend>Add New or Edit Exisiting Contacts</legend>
    <fieldset style="width:50%;">
        <legend>Select one option below</legend>
        <div id="radioContactTasks">
            <table id="MainContent_rblAddEditContact" class="registerradio">
<tr>
    <td><label for="MainContent_rblAddEditContact_0">Add New Contact</label><input id="MainContent_rblAddEditContact_0" type="radio" name="ctl00$MainContent$rblAddEditContact" value="Add New Contact" /></td>
</tr><tr>
    <td><label for="MainContent_rblAddEditContact_1">Edit Existing Contact</label><input id="MainContent_rblAddEditContact_1" type="radio" name="ctl00$MainContent$rblAddEditContact" value="Edit Existing Contact" /></td>
</tr><tr>
    <td><label for="MainContent_rblAddEditContact_2">Delete Existing Contact</label><input id="MainContent_rblAddEditContact_2" type="radio" name="ctl00$MainContent$rblAddEditContact" value="Delete Existing Contact" /></td>
</tr>

  • 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-16T14:25:35+00:00Added an answer on June 16, 2026 at 2:25 pm

    If your radio buttons have value like this

    <input type="radio" value="rdo-1" name="radio1" />
    

    then you may try this to get the rdo-1

    $("#radioContactTasks [type='radio']").on("change", function () {
        alert($(this).val()); // rdo-1
    });
    

    Example.

    Otherwise, if your radio buttons are like this, without a value attribute

    <input type="radio" name="radio1" />
    

    then I think you don’t need above code because only one radio button can be selected in a named group and it’s value could be on or off and in this case $(this) inside the handler is always the checked one and it’s value will be on.

    Example.

    Alternatively, if you need to get the checked value of your radio button outside of the change handdler then you can use this

    $("#radioContactTasks input[type='radio']:checked").val();
    

    Example.

    P/S: If still now you have confusions then I suggest you to post the source code rendered by the browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Where can I find a tutorial to get started learning jQuery? Considering
Possible Duplicate: Where can I find a tutorial to get started learning jQuery? I
I'm learning JQuery and I've run into a problem I can't seem to get
I'm learning jQuery, as you can see from my last questions. Now I try
I'm learning jquery and wrote this so I can do two seperate $.GET to
I'm learning JQuery and trying to get it working with ASP.NET MVC 4. I
I've just started learning jQuery/javascript, so this might seem like a really basic question,
i have started to learning Jquery and i can't activate the resizable function. i
I come from an ExtJS background and am slowly learning jQuery. I am trying
I'm still learning JQuery (and as a result a little JavaScript) but I can't

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.