Hi,
I'd like to know the performance related differences between
Response.Redirect and Server.Transfer.
I'd like to redirect the user to a different page.
I can either do a Response.Redirect("URL") or a Server.Transfer("URL").
So I'd like to find out which is more efficient/better.
Can anyone please tell me or give any pointers to links on the web?
Thanks & Regards
Harsh Thakur 4 2079
From an efficiency perspective, there's no doubt that Server.Transfer is
better.
Response.Redirect requires a round trip back to the browser, while this is
unnecessary with Server.Transfer.
About the only downside to Server.Transfer is that, because all the action
stays on the server, the browser is not aware that the page has changed and
the original page's URL is still displayed in the browser. This can also
cause issues with the browser back button since the browser sees it as the
same page. If you can live with that then definitely go with
Server.Transfer.
--
I hope this helps,
Steve C. Orr, MCSD http://Steve.Orr.net
Developer for Hire
"Harsh Thakur" <ha****@cybage.com> wrote in message
news:ur**************@tk2msftngp13.phx.gbl... Hi,
I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a Response.Redirect("URL") or a Server.Transfer("URL"). So I'd like to find out which is more efficient/better. Can anyone please tell me or give any pointers to links on the web?
Thanks & Regards Harsh Thakur
Hi Steve,
Thanks for your response.
Now I feel much better about using Server.Transfer.
I have one more query though.
What happens to the Page object which invoked the Server.Transfer?
Lets say PageOne called Server.Transfer("PageTwo").
I know PageOne stays alive for a while longer.
When is it destroyed? Is it GC'd just like any other object?
I'd like to know this because it might mean extra memory load for the
server.
Actually, instead of using query strings, we expose a Get method on PageOne
and then call that method in the Page_Load of PageTwo.
Regards
Harsh Thakur
"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl... From an efficiency perspective, there's no doubt that Server.Transfer is better. Response.Redirect requires a round trip back to the browser, while this is unnecessary with Server.Transfer. About the only downside to Server.Transfer is that, because all the action stays on the server, the browser is not aware that the page has changed
and the original page's URL is still displayed in the browser. This can also cause issues with the browser back button since the browser sees it as the same page. If you can live with that then definitely go with Server.Transfer.
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net Developer for Hire
"Harsh Thakur" <ha****@cybage.com> wrote in message news:ur**************@tk2msftngp13.phx.gbl... Hi,
I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a Response.Redirect("URL") or a Server.Transfer("URL"). So I'd like to find out which is more efficient/better. Can anyone please tell me or give any pointers to links on the web?
Thanks & Regards Harsh Thakur
The Page object is transferred also in the HttpContext. It is GC'd like any
other object. As for the memory load, I believe using Server.Transfer would
be more optimal, as it doesn't require the processing of 2 Requests.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Neither a follower nor a lender be.
"Harsh Thakur" <ha****@cybage.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Hi Steve,
Thanks for your response. Now I feel much better about using Server.Transfer.
I have one more query though. What happens to the Page object which invoked the Server.Transfer? Lets say PageOne called Server.Transfer("PageTwo"). I know PageOne stays alive for a while longer. When is it destroyed? Is it GC'd just like any other object? I'd like to know this because it might mean extra memory load for the server.
Actually, instead of using query strings, we expose a Get method on
PageOne and then call that method in the Page_Load of PageTwo.
Regards Harsh Thakur
"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message news:eu**************@TK2MSFTNGP09.phx.gbl... From an efficiency perspective, there's no doubt that Server.Transfer is better. Response.Redirect requires a round trip back to the browser, while this
is unnecessary with Server.Transfer. About the only downside to Server.Transfer is that, because all the
action stays on the server, the browser is not aware that the page has changed and the original page's URL is still displayed in the browser. This can
also cause issues with the browser back button since the browser sees it as
the same page. If you can live with that then definitely go with Server.Transfer.
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net Developer for Hire
"Harsh Thakur" <ha****@cybage.com> wrote in message news:ur**************@tk2msftngp13.phx.gbl... Hi,
I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a Response.Redirect("URL") or a
Server.Transfer("URL"). So I'd like to find out which is more efficient/better. Can anyone please tell me or give any pointers to links on the web?
Thanks & Regards Harsh Thakur
Hi Kevin,
Thanks for your reply.
Regards
Harsh Thakur
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:e9**************@tk2msftngp13.phx.gbl... The Page object is transferred also in the HttpContext. It is GC'd like
any other object. As for the memory load, I believe using Server.Transfer
would be more optimal, as it doesn't require the processing of 2 Requests.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Neither a follower nor a lender be.
"Harsh Thakur" <ha****@cybage.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Hi Steve,
Thanks for your response. Now I feel much better about using Server.Transfer.
I have one more query though. What happens to the Page object which invoked the Server.Transfer? Lets say PageOne called Server.Transfer("PageTwo"). I know PageOne stays alive for a while longer. When is it destroyed? Is it GC'd just like any other object? I'd like to know this because it might mean extra memory load for the server.
Actually, instead of using query strings, we expose a Get method on PageOne and then call that method in the Page_Load of PageTwo.
Regards Harsh Thakur
"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message news:eu**************@TK2MSFTNGP09.phx.gbl... From an efficiency perspective, there's no doubt that Server.Transfer
is better. Response.Redirect requires a round trip back to the browser, while
this is unnecessary with Server.Transfer. About the only downside to Server.Transfer is that, because all the action stays on the server, the browser is not aware that the page has
changed and the original page's URL is still displayed in the browser. This can also cause issues with the browser back button since the browser sees it as the same page. If you can live with that then definitely go with Server.Transfer.
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net Developer for Hire
"Harsh Thakur" <ha****@cybage.com> wrote in message news:ur**************@tk2msftngp13.phx.gbl... > Hi, > > I'd like to know the performance related differences between > Response.Redirect and Server.Transfer. > I'd like to redirect the user to a different page. > I can either do a Response.Redirect("URL") or a Server.Transfer("URL"). > So I'd like to find out which is more efficient/better. > Can anyone please tell me or give any pointers to links on the web? > > Thanks & Regards > Harsh Thakur > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Stephen |
last post by:
I was wondering if someone can help me with an web application design
problem. I have a aspx page which builds up an arraylist called addresses
and outputs the values in the arraylist items to a...
|
by: \A_Michigan_User\ |
last post by:
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors?
1. Client-side VBscript code: call navigate("\\209.11.22.33\MyDir")
2. Client-side VBscript code: location.href...
|
by: Justin |
last post by:
Hi,
Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are the
proper usages of the two methods that seems working
similar..
The...
|
by: Paul de Goede |
last post by:
I set the Response.Filter in my aspnet application but I
have noticed that if you do a Server.Transfer that the
filter doesn't get called. And in actual fact the response
is mostly empty. It seems...
|
by: Alan Silver |
last post by:
Hello,
Sorry if this is a stupid question, but I can't really see much
difference between these tow methods according to the scant info in the
SDK.
Could anyone enlighten me? TIA
--
Alan...
|
by: Bill |
last post by:
In file FIRST.ASP, I've got
<%
Response.Redirect "SECOND.ASP"
%>
The redirect is happening, and I'm seeing the content from SECOND.ASP in the browser,
but the URL in the browser is still...
|
by: Nathan Sokalski |
last post by:
The last two lines of code in the Click event of a Button Control on my page
are:
Me.WelcomeEmail()
Response.Redirect("mainmenu.aspx")
The last line of code in Me.WelcomeEmail() is:
|
by: RN1 |
last post by:
When a server encounters the line
Response.Redirect("abcd.asp")
in a ASP script, the server tells the browser that it has to be
redirected to another page (which is abcd.asp, in this case)....
|
by: jasonheath.net |
last post by:
I apologize in advance for the length of this post. I wanted to get as
much detail as possible in here.
We have 1 web app that contains the functionality to do some single
sign-on logic. The...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |