Technicalities: response.Redirect and Server.Transfer
-
Hello all Gurus, I have a quick question: can you please shed some light on the deference’s between using
Response.Redirect
andServer.Transfer
I understand that one runs at the client and the other terminates the current page and starts executing the new page on the server. Can you please provide some more explanation of what is going in exactly, and when it is preferred top use each one of them. Thank you very much in advance for all your help. -
Hello all Gurus, I have a quick question: can you please shed some light on the deference’s between using
Response.Redirect
andServer.Transfer
I understand that one runs at the client and the other terminates the current page and starts executing the new page on the server. Can you please provide some more explanation of what is going in exactly, and when it is preferred top use each one of them. Thank you very much in advance for all your help.DotNet WebDev Newbe wrote: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer The redirect will actually force send a response to the browse and tell it to navigate to another page. The transfer will internally transfer to another page on the server without sending anything back to the client. This means to the client, it does not know that it is not using the page requested since the transfer was internal to the server. The later makes the process faster and is the perferred method for transferring to a page on the same server. Rocky Moore <><
-
Hello all Gurus, I have a quick question: can you please shed some light on the deference’s between using
Response.Redirect
andServer.Transfer
I understand that one runs at the client and the other terminates the current page and starts executing the new page on the server. Can you please provide some more explanation of what is going in exactly, and when it is preferred top use each one of them. Thank you very much in advance for all your help.Adding to previous reply by Rocky moore one more advantage in server.transfer in .net is that u can retrieve posted form values in the transferred page.. just u need to give the second parameter to the transfer method as true.. server.transfer("somepage.aspx",true) so by this the form values can be transferred to another page.. Cheers Thotatri P, Sr.Software Engineer Scape Velocity Net solutions Ltd. Chennai
-
DotNet WebDev Newbe wrote: can you please shed some light on the deference’s between using Response.Redirect and Server.Transfer The redirect will actually force send a response to the browse and tell it to navigate to another page. The transfer will internally transfer to another page on the server without sending anything back to the client. This means to the client, it does not know that it is not using the page requested since the transfer was internal to the server. The later makes the process faster and is the perferred method for transferring to a page on the same server. Rocky Moore <><
Rocky Moore wrote: The later makes the process faster and is the perferred method for transferring to a page on the same server. Just want to add: 1. Server.Transfer doesn't seem to work between virtual directories on the same server. For example, you cannot transfer to a page on a different virtual directory, even if it is located on the same website. 2. You cannot use Server.Transfer with non .NET pages (.asp pages, for example). Click here to see my articles and software tools