Not getting form values

Discussion in 'ASP General' started by David C, Aug 20, 2004.

  1. David C

    David C Guest

    I have the following line of code in my asp page

    Dim ix
    For ix = 1 to Request.Form.Count
    fieldName = Request.Form.Key(ix)
    fieldValue = Request.Form.Item(ix)
    Response.Write fieldName
    Response.Write fieldValue &
    Next
    Response.End

    It is not returning the results of any field on the previous form page.
    Does anyone know what I might look for? Thanks.

    David
    David C, Aug 20, 2004
    #1
    1. Advertising

  2. David C

    Bob Lehmann Guest

    fieldName = ix
    fieldValue = Request.Form(ix)

    Bob Lehmann

    "David C" <> wrote in message
    news:#qzF#...
    > I have the following line of code in my asp page
    >
    > Dim ix
    > For ix = 1 to Request.Form.Count
    > fieldName = Request.Form.Key(ix)
    > fieldValue = Request.Form.Item(ix)
    > Response.Write fieldName
    > Response.Write fieldValue &
    > Next
    > Response.End
    >
    > It is not returning the results of any field on the previous form page.
    > Does anyone know what I might look for? Thanks.
    >
    > David
    >
    >
    Bob Lehmann, Aug 20, 2004
    #2
    1. Advertising

  3. David C

    David Guest

    Still getting nothing. Do you know of anything that would keep me from
    getting results in Request.Form ?

    David



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    David, Aug 20, 2004
    #3
  4. David C wrote:
    > I have the following line of code in my asp page
    >
    > Dim ix
    > For ix = 1 to Request.Form.Count
    > fieldName = Request.Form.Key(ix)
    > fieldValue = Request.Form.Item(ix)
    > Response.Write fieldName
    > Response.Write fieldValue &
    > Next
    > Response.End
    >
    > It is not returning the results of any field on the previous form
    > page. Does anyone know what I might look for? Thanks.
    >
    > David


    Back to basics:
    Show us a small portion of the form you are submitting that reproduces the
    problem. Cut it down to the smallest size possible that still reproduces the
    problem (we're not going to slog through 1000 lines of html to find the
    <form> element - at least, I'm not)

    Bob Barrows
    --
    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], Aug 20, 2004
    #4
  5. David C

    Ray at Guest

    Are you using method=POST for your form? ___POST___

    http://www.aspfaq.com/5007

    Ray at work


    "David" <> wrote in message
    news:...
    > Still getting nothing. Do you know of anything that would keep me from
    > getting results in Request.Form ?
    >
    > David
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Ray at, Aug 20, 2004
    #5
  6. David C

    David Guest

    Yes, I am using method=POST



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    David, Aug 21, 2004
    #6
  7. David C

    David Guest

    What it turned out to be is that I was going to the new page from a
    hyperlink and when you do that, there are no form variables passed. I
    changed it to run a javascript function and passed it the url info and
    that function submit() ed the form.

    Thanks all.

    David



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    David, Aug 24, 2004
    #7
    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. Richard Dixson
    Replies:
    1
    Views:
    506
    Joe Fallon
    May 18, 2004
  2. Replies:
    1
    Views:
    3,901
    Tim B
    Jan 7, 2006
  3. Kenny
    Replies:
    8
    Views:
    102
    Thomas 'PointedEars' Lahn
    Dec 3, 2003
  4. KK
    Replies:
    7
    Views:
    89
  5. KK
    Replies:
    0
    Views:
    82
Loading...

Share This Page