By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,923 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

Little "Post" Issue

P: n/a
Hi guys,
Let me explain what I want to do in just 3 steps:

Step 1:
An HTML page that has a form which passes some data to an aspx page

Step 2:
The aspx page take this values and add some others, lets say VarA = "Fun"

Step 3:
my aspx page send another POST with the first values and the value of VarA
(which is "Emulating" a hidden value OR text input) to a third page that
accepts ONLY Posted values NO QuerryStrings.

The question is: How do I make a Post from code?, I mean, how can I emulate
a HTML form from the script in order to pass some variables to a third
page?.
Thanks in advance.

Omar
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Thanks but this is NOT what I was looking for.
I want to emulate to submit of data from ASP code not from JavaScript Code.
I don't want to display an page, I just want to execute an ASP page that
just POST data to another page with a Subroutine or a Function, Is this
possible?.
Thanks anyway

Omar

"Mark" <mark@--somewhere--.com> escribió en el mensaje
news:Xn******************************@207.46.248.1 6...
"Omar E Contreras" <om************@cantv.net> wrote in
news:uR**************@TK2MSFTNGP11.phx.gbl:
Hi guys,
Let me explain what I want to do in just 3 steps:

Step 1:
An HTML page that has a form which passes some data to an aspx page

Step 2:
The aspx page take this values and add some others, lets say VarA =
"Fun"

Step 3:
my aspx page send another POST with the first values and the value of
VarA (which is "Emulating" a hidden value OR text input) to a third
page that accepts ONLY Posted values NO QuerryStrings.

The question is: How do I make a Post from code?, I mean, how can I
emulate a HTML form from the script in order to pass some variables to
a third page?.
Thanks in advance.

Omar


Write out a form with the action set to the destination page and the
method set to post. In the onload, do a form.submit().

e.x.

<html>
<body onload="document.theform.submit()">
<form name="theform" id="theform" action="<%=destpage%>" method="post">
<input type="hidden" name="VarA" value="<%=VarA%>">
<input type="hidden" name="other" value="<%=Request.Form["other"]%>">
</form>
</body>
</html>
Mark

Jul 19 '05 #2

P: n/a
"Omar E Contreras" <om************@cantv.net> wrote in
news:O9**************@tk2msftngp13.phx.gbl:
Thanks but this is NOT what I was looking for.
I want to emulate to submit of data from ASP code not from JavaScript
Code. I don't want to display an page, I just want to execute an ASP
page that just POST data to another page with a Subroutine or a
Function, Is this possible?.
Thanks anyway

Omar

In that case, check out the HttpWebRequest and HttpWebResponse classes.
They'll do exactly what you are looking for.

Mark
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.