How do I redirect using POST

D

davidfahy

Hi all

How can I transfer user to another server using POST. The problem is
that
Server.Transfer (preserves form data) works just in current server.
Response.Redirect - uses GET method. However I have to open a remote
server
page using POST method. Using HttpWebRequest class is not good
solution, as I can post to and read data from remote server, but user
browser itselft is still connected to my
server.

Thanks in Advance
 
B

bruce barker \(sqlwork.com\)

you have to do it in client script. render a html form with an auto post.

<form name=mypost action="othersite.com" method=post>
<input type=hidden name=field1 value="value1">
<input type=hidden name=field2 value="value2">
</form>
<script>document.forms["mypost"].submit();</script>


-- bruce (sqlwork.com)
 
P

Peter Morris [Droopy eyes software]

Would returning the HTTP response for "Permanently moved" do it?
 
E

Erik Funkenbusch

How can I transfer user to another server using POST.

If you're using .NET 2.0, then you can set the URL to post to in the button
properties. If you're using .NET 1.1, then you have to do it through some
client side script.
 
V

vMike

Hi all

How can I transfer user to another server using POST. The problem is
that
Server.Transfer (preserves form data) works just in current server.
Response.Redirect - uses GET method. However I have to open a remote
server
page using POST method. Using HttpWebRequest class is not good
solution, as I can post to and read data from remote server, but user
browser itselft is still connected to my
server.

Thanks in Advance

If you are using 2.0 you can look into PostBackURL for buttons and images
and linkbuttons
 

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

Top