473,485 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

checked AND unchecked

Hi again,

Within a submitted page that has mutilple checkboxes with
the same name, the request.form("mycheckboxes") has a
comma separated list of the values of all the ones
checked....
but I also need to know which ones are not checked... How
can I know that ?

Thanks.
Jul 19 '05 #1
2 2537
It's the rest of them ;)

You need to either go get them again, or include all the values in a hidden
field.

I'm assuming your checkboxes are coming from a database. So you could
requery the database and compare the returned values with those submitted.

OR

On your form, you can put in a hidden field with all the values in it.
<input type=hidden name=AllPossibleCheckboxValues value="1, 2, 3, 4, 88">
"Joel Brabant" <jo**********@tembec.com> wrote in message
news:10****************************@phx.gbl...
Hi again,

Within a submitted page that has mutilple checkboxes with
the same name, the request.form("mycheckboxes") has a
comma separated list of the values of all the ones
checked....
but I also need to know which ones are not checked... How
can I know that ?

Thanks.

Jul 19 '05 #2
They will not be returned in the form collection if they are not checked.
How are the checkboxes being created? Can you not pull from the same source
to get that information?

You could use a hidden input on your form and then compare the values:

<inpt type="checkbox" name="chk1" value="1">
<inpt type="checkbox" name="chk1" value="2">
<inpt type="checkbox" name="chk1" value="3">
<inpt type="checkbox" name="chk1" value="4">
<input type="hidden" name="allPossibleValues" value="1,2,3,4">

Ray at work
"Joel Brabant" <jo**********@tembec.com> wrote in message
news:10****************************@phx.gbl...
Hi again,

Within a submitted page that has mutilple checkboxes with
the same name, the request.form("mycheckboxes") has a
comma separated list of the values of all the ones
checked....
but I also need to know which ones are not checked... How
can I know that ?

Thanks.

Jul 19 '05 #3

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

Similar topics

26
2849
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal...
9
1835
by: Jeff Louie | last post by:
I drank too much coffee last night and came up with a suggestion about how to add checked exceptions to C# http://www.geocities.com/jeff_louie/OOP/oop14.htm Comments expected <g> Regards,...
0
1015
by: keithv | last post by:
I've created my own value type which will overload the "+" operator. I have two routines to do addition, differing only in that one throws an error on overflow. Is there a way to get the...
4
2463
by: RodBillett | last post by:
I have a situation where I have 3 checkboxes - and at least 1 needs to be selected at all times... I have implemented the code that allows this behavior to happen, BUT Viewstate gets all messed...
1
6996
by: Dennis | last post by:
I have a checked list box and am trying to use the SetItemCheck method as follows: mylistbox.SetItemChecked(indextoset, True) It seems to have no effect and the display does not show the box...
2
2303
by: Aaron Reimann | last post by:
I have a lot of check boxes. This is an update of the check boxes, I want something was checked, then to do an insert (which is currently working), if something is no longer checked...delete the...
1
2455
by: ttamilvanan81 | last post by:
Hai i have using the checkbox in for loop. I need the urgent help from anyone, for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are...
9
2088
by: dfletcher | last post by:
Hi all, This is my first post so please bear with me. I have a youth soccer uniform order ASP application that loads and pulls from a SQL database that allows soccer teams to construct a uniform...
0
1410
by: J | last post by:
I'm dynamically adding checkboxes in the Page_Load (regardless of PostBack). When IsPostBack, the checkboxes display as I expected and their checked/unchecked status is also as expected. At this...
6
3676
by: beary | last post by:
This is embarrassing, but I have a form pulling data from mysql using php. Lots of different checkboxes in it. When user checks one or more boxes, all goes well; values are added and db is updated....
0
7116
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
7161
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
7275
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4857
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4551
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1376
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
595
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
247
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.