A generic form parser...

Results 1 to 4 of 4

Thread: A generic form parser...

  1. #1
    John Holliday Guest

    Default A generic form parser...

    I am trying to write a generic form parser using ASP. Since I wouldn&#039t know how many fields the form has and what type of fields they are beforehand, how&#039d I go about this? Is there a "Fields" collection of some sort? And help is greatly appreciated. Thanks.<BR><BR>JHH

  2. #2
    Join Date
    Dec 1969
    Posts
    572

    Default RE: A generic form parser...

    There is a form collection as:<BR>strQuery = Request.Form<BR>If you really want to wright generic form parser, you probably need to use Dictionary object to store your variables.<BR>You can find generic form parser in "Professional Active Server Pages 2.0"

  3. #3
    Ian Stallings Guest

    Default different opinion

    I disagree, You can use Ubound to check the size<BR>of the collection becasue it&#039s an array. There is no point<BR>in taking a collection and placing it in another collection.<BR>It&#039s not efficent.<BR><BR>This will write the contents of the form but<BR>you can do whatever you want in the loop - <BR><BR>&#060;%<BR>For i = 0 to UBound(Request.Form)<BR>Reponse.write(Request.Form (i))<BR>Next<BR>%&#062;

  4. #4
    John Holliday Guest

    Default RE: different opinion

    Thanks for the reply. But I tried the code, and apparently Request.Form isn&#039t an array. Ubound() gave an invalid data type error message, and attempts to write Request.Form(x)(even when I set x to zero) gave array index out of range message.


Posting Permissions

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