Results 1 to 5 of 5

Thread: Form Collection

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    Form Collection

    Hi !

    I have a S**T load of forms to do and i would like to use a generic send.asp to send the result in a email!

    So, with ASP, i want to spit out an email that will look similar to my form !!

    But, if i do this

    VB Code:
    1. For Each Item In Request.Form
    2.     Response.Write Request.Form(Item) & "<BR>"
    3. Next

    it works, but it does'nt come in the order of my form, but i can use Item to know the name of the field !

    To have it in order, i have t do :

    VB Code:
    1. For x=1 To Request.Form.Count
    2.     Response.Write Request.Form(x) & "<BR>"
    3. Next

    This one comes in order, but i can't find out the name of my field, is there a way to know the name of the field ?

    Thanks and i hope i explained it ok ?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Do you mean

    Request.form(x).key

    ?

  3. #3

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    Damm, I thought that was it, but it was'nt

    Object doesn't support this property or method: 'Request.Form(...).Key'
    I'll have to go the other way, but their not order the same way the form is, how is it ordered ?

  4. #4

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    cool cool !

    You almost had it !

    It is

    Request.Form.Key(x)

    and not

    Request.Form(x).Key

    Because Request.Form(x) is like Request.Form.Item(x), Request.Form(x).Key was like doiing Request.Form.Item(x).Key !!

    Thanks for your help !!

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Woohoo!!!

Posting Permissions

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



Click Here to Expand Forum to Full Width