ASP.NET Refirect with POST

T

Thom Little

In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and include
POST data (i.e., like a form. The form data is changed dynamically by the
C# page.

Can anyone point me to an example? I think it is ...

Response.AddHeader( ... );
Response.Redirect( ... );

If it is, what is the Header designation? If it isn't, how do I do it?

(The reason for doing this instead of "get" is to hide the parameters from
the "casual" visitor.
 
T

Thom Little

The websites are unfortunately on different servers. This rules out
Server.Transfer( ).
 
S

Scott M.

Why does this rule out ServerTransfer()? The current data will be posted to
whatever url you pass it to (even if that is on a different server).
 
T

Thom Little

I have not been able to transfer to another server as you suggest. There
are a number of references that state that it is limited to the same server.
One of them is ...

http://www.developer.com/net/asp/article.php/3299641

.... have you seen an example somewhere that shows this assertion to be
incorrect? (It would be wonderful if you have.)
 
D

Dhanraj K.S

There are two ways you can do that,

1. You can create an object for WebRequest and Create a Name Value
collection for the values and post the data to that external URL
2. Use Response.Write / Script Manager of ASP.NET 2.0 to submit it through
simple form submission.

I have just given you an idea, Let me know if you know more details on how
to do it ?

Thanks
Dhanraj
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top