What is the difference between response.redirect and
server.transfer, how to choose one among the other?
Answer Posted / chigicherla mallikarjuna
Server.Transfer
--------------------------------------------------------
Server.Transfer Can move one page to Another page if that
page is in same website.
if Default.aspx, Default2.aspx Are in the same Website
then we can:
Server.Transfer("Default2.aspx");
//By this we can navigate to Default2.aspx
Without changing the Url:
http://localhost:4758/WebSite2/Default.aspx
But if we write:
Server.Transfer("http://www.google.com")
it cannot navigate to That requeste page
where as
Response.Redirect Can navigate to Other pages
Response.Redirect("Default2.aspx")
Response.Redirect("http://www.google.com")
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How to sign out from forms authentication?
Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net
How do you remove duplicates without using remove duplicate stage?
How many types of validators are there in asp net?
What is a viewbag?
What are sessions in asp net?
What is cache in asp net?
Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc
Hi All, Im an MCA holder with 3+ years of experience in asp.net. Now i want to move to some good government job. I have no idea about different categories of exams held & which one can be applicable for my education background. I have done B.A with MCA. Please help me out with your valuable suggestions. I would be very grateful. Thanks Anuj
Explain global assembly cache.
What are the event handlers that we can have in global.asax file?
What is the difference between Hash table and Array list?
Explain the namespace classes used in asp.net mvc? : asp.net mvc
What are the different method of navigation in asp.net?
Define asp.net caching?