Posting ASP .Net web form to another asp page

N

Newbie

Hi,

I need help in posting asp .net application web form to another asp based
web app.

I have seen many examples using HttpWebRequest class but the problem is I do
not want the request back but want to post the data to another form so that
at the asp page level we can use request.form values.

Any leads would definately be appreciated.

thanks

Ab
 
S

Scott M.

You can't post to a different page in ASP.NET, this is the built-in
architecture. What you can do is use Server.Transfer(newPage.aspx), which
will transfer control to the new page specified as well as the request
object, so data in the request object will be available on the new page.
 
Á

ÁõÃô

<form id="programmaticID"
method=POST | GET
action="srcpageURL"
runat="server" >
Other controls, input forms, and so on.
</form>
 
S

Scott M.

In .NET you can set the form's action to whatever you like, it won't post to
that page. Server forms submit to themselves, no matter what. This is the
fundamental architecture of ASP.NET and the basis for PostBack & ViewState.
 
B

Bin Song

Just skip the ASP.NET's post-back mechanism.
Using the traditional Querystring way.
On the submit button onclick event, build the querystring
<script language="javascript" for="button1" event="onclick">
{
var strQuery = "targetURL.asp?Field1=" + Field1.value + "&Field2=" + Field2.value;
window.navigate(strQuery);
}
</script>

Bin
MCP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top