asp.netresponse.redirectserver.transfer

How to use Server.Transfer effectively


How to use Server.Transfer("default.aspx") for better performance for navigating within the website. When I use this, it is not changing the url in the address bar. How can I achieve new url by server.transfer. Or (If Not) how can I gain performance with Response.Redirect("default.aspx").


Solution

  • You need to understand the difference between Response.Redirect("page.aspx") and Server.Transfer("page.aspx")

    Server.Transfer:

    Use your best judgement when to use Response.Redirect and when to use Server.Transfer. I would only recommend using 'Server.Transfer' if you want to send Form Controls' data from one page to other, otherwise it will give you a debugging nightmare.