473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to simulate HTTP POST using headers?

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
Jul 19 '05 #1
1 3244
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" <lf*****@think-bluetherestisgibberish.net> wrote in message
news:ne********************@newsfront4.netvisao.pt ...
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

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: vm | last post by:
Hi, for some reason my POST is not working properly. I am basically just trying to get a simple stock quote from yahoo by posting the ticker symbol (GE as an example) into finance.yahoo.com. ...
3
by: q2005 | last post by:
Hi, all Is that possible I can do window.open("http://xserver1/app/typ/test/tesServer.php?aaa=111&bbb=222&ccc= 333","","") to simulate a POST ACTION with a form rather than a GET ACTION? Jack
2
by: dast | last post by:
I want to simulate an input and post into a web page and than download the web page that is opened after the correct input! The web page exists of an user input form with userid and password, after...
3
by: C# Learner | last post by:
The following code gets the *body* of an HTTP message: <code> response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream(),...
4
by: Al Cadalzo | last post by:
I'm trying to simulate a form post (i.e. Method="POST"). The FORM POST I'm trying to simulate is similar to this: <FORM NAME=SearchForm METHOD=POST ACTION=Search> <SELECT name="criteriaA" >...
8
by: Andreas Klemt | last post by:
Hello, I get this error Message "cannot redirect after http headers have been sent" when I do this response.redirect ("home.aspx") How can I find out with vb.net if already a http header has...
6
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
1
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
0
by: nospam | last post by:
Hello, I want to simulate posting to a form method with some data. I don't want to use query strings. I want to 'submit' to a php method with some form fields filled out on the server. So,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.