473,698 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.su bmit()" 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.AddHea der 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 3273
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*****@thin k-bluetherestisgi bberish.net> wrote in message
news:ne******** ************@ne wsfront4.netvis ao.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.su bmit()" 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.AddHea der 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
1787
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. However, when I POST, I do get a response back, but it is just the main page finance.yahoo.com and it doesn't seem as if the POST got through. I am using Python 2.2. I get a status and reason of 200 and OK respectively. I've searched through these...
3
8083
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
2681
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 input the correct data and pressing the submit button another web page will be opened. I have tried to download the web page with the following code (I am using the CAmHttpSocket class at http://www.codeproject.com/internet/amhttputils.asp):
3
15856
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(), Encoding.UTF8); string html = sr.ReadToEnd(); </code>
4
7078
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" > <OPTION VALUE=1>AAAAAAAAAAA</OPTION> <OPTION VALUE=2>BBBBBBBBBBBB</OPTION> </SELECT> ....
8
24269
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 been sent like If response.IsSentHttpHeader then ....
6
12274
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 using: Set xml = Server.CreateObject("Microsoft.XMLHTTP")
1
2479
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 using: Set xml = Server.CreateObject("Microsoft.XMLHTTP")
0
1526
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, my web page has 2 forms - one 'runat' server and one HTML form. On a button click in the 'runat' form, I want to POST to the HTML form (which in turn calls my php method).
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.