Server.Transfer

  • Thread starter Thread starter Andrew Robinson
  • Start date Start date
A

Andrew Robinson

Quick question....

Can I user Server.Transfer between two different web sites on the same
server? And pass data via the Context object?
 
re:
Can I user Server.Transfer between two different web sites on the same server? And pass data via
the Context object?

Andrew,

No. The source and target pages must be in the same Web application if you use Server.Transfer.
If you want to send the user to a different application, use Response.Redirect.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Hello Andrew,

I agree with Juan. Server.Transfer will work on pages within the same
ASP.NET application and the two pages(source , target) will be executed on
the same httprequest pipeline, that's why we can share data through the
Context.Items collection.

For redirection between pages in separate application or server,
"Response.Redirect" is the recommended and common means. And if you want to
pass some simple data, you can use the QueryString parameters. Is there any
particular requirement or concerns that prevent you from using
Response.Redirect and querystring in your scenario?

Anyway, please feel free to post here if you have any further questions
that we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Andrew,

Does the information in our previous rely help you some? If there is any
further questions on this, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top