Confirming Postback in classic ASP

Discussion in 'ASP General' started by A Ratcliffe, Jul 6, 2003.

  1. A Ratcliffe

    A Ratcliffe Guest

    Hopefully just a couple of quick quick questions/responses, but its not
    something I've generally had trouble with in the past. Unfortunately, I need
    answers ASAP if anyone is available to help.

    a) Having seen .NET's IsPostBack which solves many problems, I looked at the
    ServerVariables etc to see what I could check to confirm PostBack in classic
    ASP. I initially considered using HTTP_REFERER to check it was coming from
    my form, and then I noticed the Server-variable REQUEST_METHOD which tells
    me 'POST'. Is this a safe combination to garantee my form is receiving a
    PostBack from itself?

    b) Post-data Pass-thru. I have Page1, Page2, Page 3. The USer enters some
    data in Page1, submits to Page2 which validates the data, and asks for extra
    info. When submitting to 3, I want the data from both Page1 and Page2 to be
    Posted to Page3. I know I could have a hidden form in Page2 and the
    Response.Write set values into the hidden fields from Page!, but that would
    leave Page1's details available to anyone who 'View Source'd....Is there
    anyway to 'pass-thru' the Posted Data?

    There was a third Question, but I'll put that into another post,

    Yours,

    Ann-Marie Ratcliffe
     
    A Ratcliffe, Jul 6, 2003
    #1
    1. Advertising

  2. A Ratcliffe

    Matthew Lock Guest

    Be warned that some utilities like Norton Internet Security mask the
    HTTP_REFERER by default. The most reliable method would be to encode
    something in a hidden field, and check for the value of it.

    Matthew

    "A Ratcliffe" <> wrote in message news:<>...
    > Hopefully just a couple of quick quick questions/responses, but its not
    > something I've generally had trouble with in the past. Unfortunately, I need
    > answers ASAP if anyone is available to help.
    >
    > a) Having seen .NET's IsPostBack which solves many problems, I looked at the
    > ServerVariables etc to see what I could check to confirm PostBack in classic
    > ASP. I initially considered using HTTP_REFERER to check it was coming from
    > my form, and then I noticed the Server-variable REQUEST_METHOD which tells
    > me 'POST'. Is this a safe combination to garantee my form is receiving a
    > PostBack from itself?
    >
    > b) Post-data Pass-thru. I have Page1, Page2, Page 3. The USer enters some
    > data in Page1, submits to Page2 which validates the data, and asks for extra
    > info. When submitting to 3, I want the data from both Page1 and Page2 to be
    > Posted to Page3. I know I could have a hidden form in Page2 and the
    > Response.Write set values into the hidden fields from Page!, but that would
    > leave Page1's details available to anyone who 'View Source'd....Is there
    > anyway to 'pass-thru' the Posted Data?
    >
    > There was a third Question, but I'll put that into another post,
    >
    > Yours,
    >
    > Ann-Marie Ratcliffe
    >
     
    Matthew Lock, Jul 7, 2003
    #2
    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. RSB
    Replies:
    6
    Views:
    7,729
    Karim
    May 19, 2004
  2. =?Utf-8?B?TXBob3ph?=

    Confirming Deletes in a DataGrid

    =?Utf-8?B?TXBob3ph?=, Aug 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    446
    =?Utf-8?B?UmF2aWthbnRoW01WUF0=?=
    Aug 6, 2004
  3. darrel
    Replies:
    6
    Views:
    503
    darrel
    Jun 14, 2005
  4. UJ
    Replies:
    4
    Views:
    2,796
    Curt_C [MVP]
    Aug 10, 2005
  5. Darrel
    Replies:
    3
    Views:
    8,920
    Laurent Bugnion
    Apr 26, 2006
Loading...

Share This Page