What is the difference between the following:
- Server.transfer?
- Response.Redirect?
- Postbackurl?
When should I decide to use which?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Server.Transfertells ASP.NET to redirect processing to another page within the same application. This happens completely server side. This is more “efficient” as it happens on the server side but there are some limitations with this method. The link below describes some of these.Response.Redirectactually sends a HTTP 302 status code back to client in the response with a different location. The client is then responsible for following the new location. There is another round trip happening here.PostBackUrlis not a “transfer method” but rather an property that tells the browser which URL to post the form to. By default the form will post back to itself on the server.Here’s a good link: http://haacked.com/archive/2004/10/06/responseredirectverseservertransfer.aspx