What is the difference between Server.Transfer and
Response.Redirect? Why would I choose one over the other?
Answer Posted / kumar saurabh
In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems.
As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain what is the procedure to create the environment for asp.net? : asp.net mvc
What is a response cookie?
If there are multiple update panels on the page say upd1 and upd2. There is a button placed in upd1. How can you stop upd2 to update when button placed in upd1 is clicked?
What are the properties of the eventargs argument when capturing keyboard events?
how to transfer the file from client to server using asp.net
What is the difference between a candidate key and primary key?
Explain About WebService
What is inproc and outproc?
What is a page life cycle?
What are the asp.net 2.0 features?
What is a postback in asp net?
Define repository pattern in mvc.net? : asp.net mvc
Define a multilingual website?
Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?
What is the life cycle of an asp.net page?