473,511 Members | 15,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Checkbox Array Input Not Returning

1 New Member
I have a potentially large number of checkboxes that I need to get input from. I have a table in a SQL database that has a list of names that I need to pull out, give 4 checkbox inputs for each of them, then put all the new data into a new database.

Currently I have:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Set Conn = Server.CreateObject("ADODB.Connection")
  3. Conn.open "--connection information here--"
  4. SQL = "Select firstname,lastname from [names] order by lastname"
  5. Set RS = Conn.Execute(SQL)
  6. %> 
  7. <table border=1>
  8.   <tr>
  9.     <th>Name</th>
  10.     <th>Condition One</th>
  11.     <th>Condition Two</th>
  12.     <th>Condition Three</th>
  13.     <th>Condition Four</th>
  14.   </tr>
  15.   <%
  16.     Do While Not RS.EOF
  17.   %>
  18.   <tr>
  19.     <td><%=RS("LastName")%>, <%=RS("FirstName")%></td>
  20.     <td><input type="checkbox" name="input1"></td>
  21.     <td><input type="checkbox" name="input2"></td>
  22.     <td><input type="checkbox" name="input3"></td>
  23.     <td><input type="checkbox" name="input4"></td>
  24.   </tr>
  25.   <%
  26.     RS.MoveNext
  27.     Loop
  28.   %>
  29. </table>
  30.  
This builds the table in the way I want but when I later go back and get the information from this table I run into a problem.
"Request.Form("input1")" only retrieves the value "on" from the boxes that are checked and nothing from those that are not checked.

How can I get a "false" or "off" value from the ones that are not checked so I can put the collected data into the new table in a [name, val1, val2, val3, val4] kind of format.
Jun 10 '14 #1
0 1014

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1944
by: bobby1041 | last post by:
Hi All! I am trying to make several fields in a HTML form validated, but only when a dynamic checkbox is selected. I am not sure how to do this. Here is a snippet of the dynamic checkbox...
1
1263
by: savvy | last post by:
I'm comparing two strings and trying to check a dynamic checkbox when its true on pageload , but i dont know why i'm not able to do that on page load, when i click some other links and come back to...
4
3866
by: Paul Morrison | last post by:
Hi, I have a checkbox array containing the id of a record in a MySQL database. The checkboxes are created dynamically depending on what is stored in the database. I want to send the checkbox...
1
4163
ak1dnar
by: ak1dnar | last post by:
Hi, I want to submit this Form contents after validating them.This check box is inside a loop and it will display along with some products items .Before i submit the form i want to check whether user...
5
3013
by: lucius | last post by:
Can someone provide a sample of how to add a new CheckBox control to an ASP.NET page, dynamically completely in code-behind? I am having a problem understanding which event should handle the...
3
1892
by: Raymond | last post by:
I am having a problem about the dynamic checkbox Private Sub Page_Load Me.NumberOfChkControls = 0 Dim cbCheckBox As New CheckBox cbCheckBox.Text = .Id.ToString cbCheckBox.ID = "ControlID_" +...
0
1632
by: Nolanclark | last post by:
Hi there. I've read a previous thread regarding the Old VB 6 checkbox array and how it's not really needed any more. That's fine, but I'm not really sure how to implement the checkbox control array...
3
5294
realin
by: realin | last post by:
Hiya all, i am in deep trouble, i thought it was an easy task, but now its getting on my nerves. Well i have a div on a form, which contains a number of checkboxes, as <div...
1
6005
by: iderocks | last post by:
Hi All, I created a dynamic checkbox in ASP .Net inside a Button1_Click event method (outside the page_load event) and performed the event handling method for the CheckedChanged event and when I...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7432
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...
1
7093
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...
1
5077
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
4743
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
3230
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
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
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
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.