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
Why do we need asp.net?
Name the tools or API for developing or testing web api?
What is difference between cache and session?
What is asynchronous call?
What is a ashx file?
What is the use of web.config file?
List some of the important session state modes of asp.net.
What is the syntax for datagrid and specifying columns?
Is asp.net 64-bit enabled? How?
Describe the Server Control Events of ASP.NET?
In how many ways we can retrieve table records count?
If you want to write your own dot net language, what steps you will you take care?
Explain the difference between AutoPostBack and IspostBack in ASP.NET?
How do I open an ashx file in windows 7?
What does aspcompat="true" mean?