controls in request.form

Results 1 to 2 of 2

Thread: controls in request.form

  1. #1
    Join Date
    Dec 1969

    Default controls in request.form

    My checkboxes are dynamically generated so their names and the amount may be different each time the page runs. For updating the db I can use "for each item in request.form", but this only gives me the items that are checked. I need to know the names of the unchecked checkboxes as well since I need to update corresponding records, and the names hold the key info for which record is to be updated. how can I return the name of all controls in my form, not just those with values?

  2. #2
    Join Date
    Dec 1969

    Default Can' least using your method

    Form controls that don&#039;t have values don&#039;t get posted. What you&#039;ll have to do is have a hidden field for each check box. It should have a value of 0 for false and 1 for true. Then, you&#039;ll need JavaScript code that gets executed on each click to set the corresponding hidden field with its checkbox to either 0 or 1 depending on whether the checkbox is checked.<BR><BR>When you iterate through the form collection, you check the hidden fields instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts