What is difference between Server.transfer and
Response.redirect ?
Answers were Sorted based on User's Feedback
Answer / sri
server.trasfer directly transfer the execution of a page to
another page without taking the client into the
picture.while response.redirect sends the response to the
client browser and directs him to make a request to call a
page( called round trip).it is better to use
server.transfer when you do not want to execute code on
client.
| Is This Answer Correct ? | 29 Yes | 5 No |
Answer / hema
Server.Transfer redirects directly to the new url. It does
not take a round trip. where as response.redirect tells the
client to make a request to the new url. this takes a round
trip. so it takes so much time. so server.transfer is
better when compared to response.redirect
| Is This Answer Correct ? | 17 Yes | 4 No |
Answer / yugandhar reddy
Request.Redirect tranfers the user to the new page.The new
page can be in the same application or outside the
application.Browser upgradation of new url i.e round trip
to client takes place.It cannot take the current form
control values to the new page byitself.using querystring
only it can take.
ex: Request.Redirect("Default2.aspx");
where as Server.Transfer redirects to the new page that
should be present in the same application.single trip takes
place i.e no browser upgradation of new url.It can take
current for control values to the new page using
preserveform attribute.
ex : Server.Transfer("Default2.aspx");
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / hema
Server.transfer transfers to a page on the server only
whereas response.redirect redirects to any page. In
server.transfer, the new URL is not displayed. whereas in
response.redirect the new url is displayed.
| Is This Answer Correct ? | 10 Yes | 2 No |
Answer / kiran kumar
Server.Transfer: - This redirects the client with in the
same application ie, from one ASP page to other ASP page
with in the application. This will not update the history.
Response.Redirect: - This redirects the client to the other
URL ie, from one ASP page to other applications page. This
will update the history.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / rj
without query string we can access previous page control
values in server.transfer method. Round trip not allowed
In the response.redirect method using query string we can
access the previous page controls values. Round trip allowed
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / khaleek ahmad
1) In Response.Redirect previous page is not accessible
while in Server.Transfer it is optional.
Server.Transfer(URL,bPreserveForm);
2) Server.Transfer use only within the server.But
Response.Redirect can be use ouside the server.But it should
be a full path.
For more detail please see at
http://interview-preparation-for-you.blogspot.com/2010/12/difference-between-servertransfer-and.html
| Is This Answer Correct ? | 0 Yes | 1 No |
Which is better asp or php?
How to add Textboxes Programmatically in each and every cell of Gridview along with the Excel data in the Gridvew.I mean when i get Excel data in Gridview i need to display Data and Textboxes for each and every cell of Gridview. Got it. Iam new to this concept plz help me. Thanks in Advance.
What is ClientCertificate collection?
Name the collections of session object?
What are the methods in session object in asp?
When is the Session_OnStart event fired? A. Upon every request from an application by a client for an .asp document. B. Upon the first request from an application by a client for any file in the application. C. Upon the first request for an .asp document from an application by a client. D. Upon the first request for the global.asa file, in which the event handler is located. E. Upon the first request for an. html or .asp document from an application by client
which property will make a control span an entire site office parent class
What is use of asp?
How do you initialize a two-dimensional array that you don't know the dimensions of?
How do I create an aspx file?
What do you mean by asp?
What is the purpose of application.lock method?