name/value pairs

Results 1 to 2 of 2

Thread: name/value pairs

  1. #1
    Join Date
    Dec 1969
    Posts
    134

    Default name/value pairs

    Is there any way to reference form data by name/value pairs instead of exact form names?<BR><BR>My asp page dynamically names forms which have to be passed to another page. I can retrieve them fine using request.form but I can not seperate them. <BR><BR>Is there a way of saying something similar to<BR>request.form.value(0) or something.<BR><BR>Thanks,<BR><BR>Ron

  2. #2
    Richard L. Guest

    Default RE: name/value pairs

    I&#039m not entirely clear on what you mean... <BR><BR>However, you can treat forms as collections: <BR><BR>For each fld in Request.Form<BR> For each fieldValue in Request.Form(fld)<BR> response.write fld & " : " & Request.Form(fieldValue)<BR> Next<BR>Next<BR><BR>This means if you submit:<BR><BR>&#060;form&#062;<BR>&#060;input type=&#039hidden&#039 name=&#039userName&#039 value=&#039Joe&#039&#062;<BR>&#060;input type=&#039hidden&#039 name=&#039userName&#039 value=&#039Pete&#039&#062;<BR>&#060;/form&#062;<BR><BR>It will list *both* values for userName<BR><BR>Enjoy<BR>richard@irt.org<BR>

Posting Permissions

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