retrieve all form fields

Discussion in 'ASP General' started by dfetrow410@hotmail.com, Dec 27, 2005.

  1. Guest

    I can get all fields, but how do I not get the button in the loop

    Dim FormFields
    Set FormFields = request.form
    Dim Field
    if request.form("Button2") = "Update Order" then
    For each Field in FormFields
    response.write Field & " = " & Request.Form(Field) & "<br>"
    Next
    end if
    , Dec 27, 2005
    #1
    1. Advertising

  2. wrote:
    > I can get all fields, but how do I not get the button in the loop

    Don't set its name attribute in the html tag.


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Dec 27, 2005
    #2
    1. Advertising

  3. If Field.Name <> "Button2" Then
    response.write Field & "=" .......
    End If

    <> wrote in message
    news:...
    > I can get all fields, but how do I not get the button in the loop
    >
    > Dim FormFields
    > Set FormFields = request.form
    > Dim Field
    > if request.form("Button2") = "Update Order" then
    > For each Field in FormFields
    > response.write Field & " = " & Request.Form(Field) & "<br>"
    > Next
    > end if
    >
    Patrick Kremer, Dec 27, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aemca
    Replies:
    1
    Views:
    546
    Aemca
    Jul 22, 2003
  2. Li Zhang
    Replies:
    4
    Views:
    6,027
    softip
    Feb 27, 2009
  3. Mr. SweatyFinger

    get all the form fields in a form

    Mr. SweatyFinger, Jan 26, 2007, in forum: ASP .Net
    Replies:
    20
    Views:
    868
    Alexey Smirnov
    Jan 31, 2007
  4. David
    Replies:
    2
    Views:
    194
    Bob Barrows [MVP]
    Sep 20, 2007
  5. Replies:
    23
    Views:
    449
    Tim Streater
    Dec 18, 2013
Loading...

Share This Page