473,396 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Choose 1 or many

I'm using ASP.Net and VB.net

I have 18 choices - 18 checkboxes. The user can choose 1, a few, or all.
What is the best structure to record and write the response? Select/Case
statement? Or is that only for ONE choice?
May 16 '07 #1
5 1039

"dancer" <da****@microsoft.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
I'm using ASP.Net and VB.net

I have 18 choices - 18 checkboxes. The user can choose 1, a few, or all.
What is the best structure to record and write the response? Select/Case
statement? Or is that only for ONE choice?
What about the CheckBoxList Control?
http://samples.gotdotnet.com/quickst...checklist.aspx

I guess it will be more easy to use in your case.
May 16 '07 #2
http://msconline.maconstate.edu/tuto...pnet06-04.aspx

"dancer" <da****@microsoft.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
I'm using ASP.Net and VB.net

I have 18 choices - 18 checkboxes. The user can choose 1, a few, or all.
What is the best structure to record and write the response? Select/Case statement? Or is that only for ONE choice?

May 16 '07 #3
I prefer a hybrid solution which I have found useful. The outer statement
will often use a single if branching logic statement to determine if any
selections have been made. Within the if statement block I then use the
switch statement as each successive case can be passed conditional logic and
is easier to read, modify and maintain than continuing to nest if branching
logic statements.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/

"dancer" <da****@microsoft.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
I'm using ASP.Net and VB.net

I have 18 choices - 18 checkboxes. The user can choose 1, a few, or all.
What is the best structure to record and write the response? Select/Case
statement? Or is that only for ONE choice?

May 16 '07 #4
On May 16, 1:26 pm, "dancer" <dan...@microsoft.comwrote:
I'm using ASP.Net and VB.net

I have 18 choices - 18 checkboxes. The user can choose 1, a few, or all.
What is the best structure to record and write the response? Select/Case
statement? Or is that only for ONE choice?
use one event handler for all checkboxes, check the sender - checkbox
control - TagName property. Make sure you set the TagName property for
each check box to unique id. Use that id as key to store the check/
unchecked boolean value in hash table or any other collection.

May 16 '07 #5
Could you give me example code of the switch statement?
Thanks
"clintonG" <no****@nowhere.comwrote in message
news:eY*************@TK2MSFTNGP06.phx.gbl...
>I prefer a hybrid solution which I have found useful. The outer statement
will often use a single if branching logic statement to determine if any
selections have been made. Within the if statement block I then use the
switch statement as each successive case can be passed conditional logic
and is easier to read, modify and maintain than continuing to nest if
branching logic statements.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/

"dancer" <da****@microsoft.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>I'm using ASP.Net and VB.net

I have 18 choices - 18 checkboxes. The user can choose 1, a few, or all.
What is the best structure to record and write the response? Select/Case
statement? Or is that only for ONE choice?


May 18 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DaBoo | last post by:
Hi! I'm creating dynamic a XML file. in this file are store some informations about images i use in HTML datasheets. i'm going to transform the XML file with XSLT. My Problem is, that {image}...
2
by: Volker Grabsch | last post by:
Hi! I noticed that many packages in the PyPI are using the PSF License. Does this have a special reason? Is this the common "standard" license for Python libraries? I'm just asking because...
6
by: VM | last post by:
Although I program in C# and all of the projects I work on are in C#, I was just wondering why someone would choose VB .Net or C#. Since VB .Net is as similar to VB6 as C# is toVB6, why would a...
12
by: warstar | last post by:
Hello all, I'm in a bit of a problem I'm given a project making an online shopping system for a professional barbershop. But I'm with a small problem in witch language to make the system. My...
2
by: DT | last post by:
Hi All, Can anybody tell me why you would choose one soap format over another? or are the choices based on what you are interoperating with or message size constraints. many thanks DT
4
by: freefly_xml | last post by:
I want to test to see if I am on the last page of a document. In this example it is an invoice. I want to print a different table in REGION AFTER when I am on the last page. I have tried many...
11
by: Genalube | last post by:
I am new to access, so I figure this is an easy question to answer. I just can't find it on my own. Background: Two tables with a one to many relationship (irelevantField1 is a place holder,...
5
by: lsllcm | last post by:
Hi All, I have one question about many "or" operation make system choose incorrect index There is one table TT ( C1 VARCHAR(15) NOT NULL, C2 VARCHAR(15) NOT NULL, C3 VARCHAR(15) NOT NULL,...
15
by: caca | last post by:
Hello, This is a question for the best method (in terms of performance only) to choose a random element from a list among those that satisfy a certain property. This is the setting: I need to...
1
by: Unlimited Free Domain & Web Hosting | last post by:
How to Choose an Unlimited Web Hosting 1) Visit www.axealis.com to get domain and hosting 2) Unlimited Bandwidth ,this mean unlimited data transmission for your client access. 2) Unlimited Space...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.