How to simulate HTTP POST using headers?

Discussion in 'ASP General' started by Luis Faisco, May 8, 2004.

  1. Luis Faisco

    Luis Faisco Guest

    Hi,

    my problem may be trivial but I have been searching for an answer to this on
    the web without success. Hope you can help.

    This is the scenario: I am making a wizard composed of several steps, each
    step being a form with the post method. The first steps may be completed
    whether the user is logged on to the website or not. But from a certain step
    on the user must be logged on to complete the wizard. What I do is post the
    data gathered so far to the logon page; the logon page is essentially an ASP
    page with an HTML logon form that posts to itself. Once the user logs on he
    is taken again to the wizard, to the step where he left off.

    Right now I am using the HTML form / onLoad="form.submit()" approach on the
    logon page: after the user is authenticated, the asp page builds a form with
    the "saved" data, pointing to the next step of the wizard, and uses the
    onLoad event of the body tag to submit the form. And this does what I
    intended.

    But I believe there must be a more elegant way to do this, and I suspect it
    involves setting headers directly using Response.AddHeader but I don't know
    how to do it. Am I right? If so, how to do it?

    I am using ASP 3.0

    Thanks in advance,

    Luis Faisco
    Luis Faisco, May 8, 2004
    #1
    1. Advertising

  2. You can simulate a post using XMLHTTP (http://www.aspfaq.com/2173) or with
    client-side script.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/


    "Luis Faisco" <> wrote in message
    news:newscache$yztexh$vb2$...
    > Hi,
    >
    > my problem may be trivial but I have been searching for an answer to this
    > on
    > the web without success. Hope you can help.
    >
    > This is the scenario: I am making a wizard composed of several steps, each
    > step being a form with the post method. The first steps may be completed
    > whether the user is logged on to the website or not. But from a certain
    > step
    > on the user must be logged on to complete the wizard. What I do is post
    > the
    > data gathered so far to the logon page; the logon page is essentially an
    > ASP
    > page with an HTML logon form that posts to itself. Once the user logs on
    > he
    > is taken again to the wizard, to the step where he left off.
    >
    > Right now I am using the HTML form / onLoad="form.submit()" approach on
    > the
    > logon page: after the user is authenticated, the asp page builds a form
    > with
    > the "saved" data, pointing to the next step of the wizard, and uses the
    > onLoad event of the body tag to submit the form. And this does what I
    > intended.
    >
    > But I believe there must be a more elegant way to do this, and I suspect
    > it
    > involves setting headers directly using Response.AddHeader but I don't
    > know
    > how to do it. Am I right? If so, how to do it?
    >
    > I am using ASP 3.0
    >
    > Thanks in advance,
    >
    > Luis Faisco
    >
    >
    Aaron Bertrand [MVP], May 9, 2004
    #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. mike
    Replies:
    5
    Views:
    959
    Keith M. Corbett
    Sep 21, 2004
  2. HArolD
    Replies:
    4
    Views:
    590
    HArolD
    Apr 14, 2005
  3. Antony

    cookies in HTTP POST headers

    Antony, Feb 1, 2005, in forum: HTML
    Replies:
    1
    Views:
    543
    Toby Inkster
    Feb 2, 2005
  4. Ian
    Replies:
    2
    Views:
    1,933
  5. Stuffe L.
    Replies:
    4
    Views:
    391
    7stud --
    Apr 14, 2011
Loading...

Share This Page