HTTP Post and Redirect?

D

David

I need to redirect to a page and HTTP Post data. The
Response.Redirect does not work and the HTTPREQUEST option calls the
page and waits for a response, but I need to transfer control to the
page. Eg. Redirect and POST data.

The only way I can see to do this is to format a HTML/POST, with
Javascript, page and use the RESPONSE.WRITE option.

Thanks
 
K

Kevin Spencer

Hi David,

Your question is a bit confusingly phrased. You say you need to redirect and
POST data, but you don't say whether you want to redirect to the same page
you're POSTing to. However, I get the impression that what you really want
to do is to POST data to a page, which doesn't require a redirect, since the
page that is POSTed to is the page that is returned. That is, when you POST
to an ASP.Net page, that is the page that is returned by the POST request.

Again, I can't be sure from your description, but I'll step out on a limb a
bit and make a guess that you're having trrouble figuring out how to POST
from one ASP.Net page to another, since the ASP.Net WebForm model always
POSTs back to itself. If this is the case, you should be aware that you can
have more than one form on a WebForm page, and that only one form has to be
the WebForm. Another form on the page can post to any URL you like, and it
can be submitted via JavaScript.

If this is indeed the case, come back with any questions you may have about
implementing this. If not, please clarify your question.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 

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