webrequest post method and navigate to the new url

  • Thread starter Thread starter guoqi zheng
  • Start date Start date
G

guoqi zheng

Dear Sir,

We know that we can use webRequest to make a http post. What we want is that
after http post, we would like to redirect user to the destination URL as
well. So actually, we like to have a similiar function as client html form
post but done in server side?

Is this possible and how can I do it?

regards,

Guoqi Zheng
http://www.ureader.com
 
Use the Response.Redirect("destination URL") method. Good Luck!
 
Oh, well in that case you need to modify (or add, since it is not usually
there in ASP.NET) the action attribute of the form tag in the *.aspx page
you are posting from. Just be careful, however, of the hidden fields like
__VIEWSTATE, __EVENTTARGET, and __EVENTARGUMENT that ASP.NET usually
generates for the pages, because you don't want the page you are posting to
to get confused by these fields. Good Luck!
 

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

Back
Top