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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:20:50+00:00 2026-06-09T05:20:50+00:00

I have some html checkboxes on a page and I need to verify that

  • 0

I have some html checkboxes on a page and I need to verify that they have been check in the postback event for the page.

The data for these checkboxes is not stored in a database, they just have to be checked before the use can go to the next page.

How do i verify that they are checked? I don’t see them in the Request.Form.AllKeys collection

<input id='terms_eligibility' type='checkbox'   />
<input id='terms_accurate' type='checkbox' />
<input id='terms_score_release' type='checkbox' />

EDIT
Here’s what I ended up doing

View

 @Html.CheckBox("terms_eligibility")

Controller

string eligibility = Request.Form.GetValues("terms_eligibility")[0];
  • 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-09T05:20:52+00:00Added an answer on June 9, 2026 at 5:20 am

    When a HTML checkbox is not checked then its value is not sent back to the webserver.

    MVC solves this problem by adding an <input type="hidden" /> for each checkbox which ensures that a value is always sent, so it can detect if a checkbox was checked or not.

    To use these hidden inputs you must use the Html.CheckBox or Html.CheckBoxFor helper methods.

    Anyway, the HTML you posted doesn’t have any name="" attributes. HTML inputs must have a name attribute. They don’t use the id attribute for form field keys.

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

Sidebar

Related Questions

I have a html page with a form that has some check boxes. I
I have some HTML that I need to toggle between two structures - one
i am having a UIWebView showing and HTML page that has some checkboxes, radio
I am having some trouble highlighting checkboxes and radio buttons that have been selected.
I have some html like the following: <div class=control-group> <input type=text data-bind=value: $data.DealCode name=DealCode
I have some html stored in database . I dont know that html stored
I have some Html like: <div id=adiv> <ul> <li data-id=3>Cat</li> <li data-id=4>Dog</li> </ul> </div>
I have some HTML that is being produced by a WordPress plugin that is
I have some html returned from an ajax call that contains blocks of html.
I have some html files and want to extract only lines with containing these

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.