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 7891115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:32:07+00:00 2026-06-03T06:32:07+00:00

I wanted to know how can I detect the checkbox values and selectbox entered

  • 0

I wanted to know how can I detect the checkbox values and selectbox entered in my registration form.
This is the select:

<p><label for="favorite">שחקן המועדף עליך</label>
<select name = "favor">
<option> </option>
<option value="פרקינס">דורון פרקינס</option>
<option value="סופוקליס שחורציאניטיס">סופוקליס שחורציאניטיס</option>
<option value="עומרי כספי">עומרי כספי</option>
<option value="דייויד בלו">דייויד בלו</option>
</select></p>

and that’s the checkbox:

 <p><label for="checkbox">אופנוע</label><input type="checkbox" name="bike" id="bike" value="bike" /> </p>
    <p><label for="checkbox">מכונית</label><input type="checkbox" name="car" id="car" value="car" /> </p>

How can I get the selected option and the selected boxes in the checkbox on clientside?

If anything is needed to explain let me know please,
Thank you!

Edit: I will explain myself a bit more, I’m having a registration form, which has checkboxes and tags. I want to know what the client chose and insert it into my SQL DB, I need to know how to get what the client pressed, like on what box he ticked V, what option he chose.

  • 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-03T06:32:08+00:00Added an answer on June 3, 2026 at 6:32 am

    If you want to get this client-side, you can use jQuery to harvest the results:

    $("#bike").is(':checked');
    

    and

    $("option:selected","#favor").val();
    

    Note that your select doesn’t have an id, only a name, so you’ll also need to change it to this:

    <select name="favor" id="favor">
    

    If you want to get this server-side, you can use something like this:

    string s = Request.Form["bike"];
    if ( !string.IsNullOrEmpty(s) ) {
    

    Note that most browsers will send a post value if the checkbox is checked with a value of “checked” or “true”, and not send it if it isn’t checked.

    Even better is to replace these html tags with asp.net webforms tags like so:

    <asp:CheckBox id="bike" runat="server" ... />
    

    That way you can do this server-side:

    bool checked = this.bike.Checked;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks for looking at this question. I wanted to know how can I use
I just wanted to know if I can point to class using this implementation:
I wanted to know can we have images as a values in properties file
I wanted to know how can we get the index of the array if
Hello I am new to MATLAB , I wanted to know how can I
I wanted to know if we can have a unique identifier for all objects
I wanted to know if anybody can explain me the following piece of Javascript
I just started to work with Silverlight and wanted to know how I can
I wanted to know if any one can explain the control flow of the
I wanted to know if there's a way I can bind an Asp.net Ajax

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.