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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:40:10+00:00 2026-06-09T11:40:10+00:00

I have four check boxes like this, <asp:CheckBoxList ID=CheckBoxList1 runat=server onselectedindexchanged=CheckBoxList1_SelectedIndexChanged Width=190px> <asp:ListItem>Programming Contests</asp:ListItem>

  • 0

I have four check boxes like this,

<asp:CheckBoxList ID="CheckBoxList1" runat="server" 
                onselectedindexchanged="CheckBoxList1_SelectedIndexChanged" Width="190px">
                <asp:ListItem>Programming Contests</asp:ListItem>
                <asp:ListItem>Seminars/Workshops</asp:ListItem>
                <asp:ListItem>Social Gatherings</asp:ListItem>
                <asp:ListItem>Tech Support</asp:ListItem>
</asp:CheckBoxList>

I want to store the value of these check boxes as 0 or 1 in the table. Moreover, there may be a scenario when a user selects more than one check box, how to deal with that situation? I have used the ‘bit’ data type in the database. But the confusion I am having is how to store the value of these check boxes as 0 or 1 in database?

  • 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-09T11:40:11+00:00Added an answer on June 9, 2026 at 11:40 am

    It really is quite simple. All you need to do is create a bit field for each option in your db. I do not see any other logical way of doing it.

    The true or false value returned from your checkboxes are called bools in C#. Bools are stored in the database as bits translating true to 1 and false top 0.

    Edit:

    If you are planning on expanding the options, I would recommend something along the lines of the following. You can create a table that contains all the options and set a code for them. Then create a linking table that will include the person and the option they desire. If the user chooses multiple options, they will be put in the table multiple times (once for each option).

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

Sidebar

Related Questions

I have created a User Control with 4 check boxes(server control). I want to
Suppose I have four check-boxes in a form Check-a,Check-b,Check-c,Check-d. Check-a and Check-b are already
I have a RadioGroup with four check buttons. I'd like to create a slide
I have four product gallery with the possibility to check the detail of each
I'm working on a ASP.NET web forms application. I have a four-column listview, bound
I am getting time from server it's like this 12:00PM-3:00PM,7:00PM-10:30PM This time in 12
I have four checkboxpreferences in my preferencescreen that I would like to interact like
In a JSP page I have four sample dates like 01- dec , 15-
I am creating a page in asp.net with vb.net and I have a check
This one is tricky to me: I have four groups of 8 LEDs. A

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.