Click to See Complete Forum and Search --> : Dynamically named check boxes.


achat
12-24-2003, 01:53 AM
I have an ASP (asp1) code which picks data from SQL for display. The data returned by the sql query is some thing like this
col1 col2 col3 col4 ......
row1 1 0 1
row2 0 0 0
row3 1 1 1
.
.
.

Col1 is a text field and allothers are check boxes with value of 1= tick and zero = unchecked. The display in a form is fine and users can check/uncheck the boxes. On submit i am calling another ASP (asp2) will write this changed data to DB.

The no of rows is not fixed. It could vary from situation to situation.
How can i write the ASP (asp2) code to accept the values of the checkboxes which could be varying in no each time.

russell_g_1
12-27-2003, 12:23 PM
It would be possible to create a hidden field in your form containing the total number of rows. When you submit it you should be able to get the number from the request object in asp2.

That's probably not the best way, but it would work.

achat
12-28-2003, 11:03 PM
Getting the no of rows was not the problem. the problem was to keep track of the multitude of checkboxes on the form.