أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Both responce.redirect and server.transfer methods are used to transfer a user form one web page to another web page. Both methods are used for same purpose but still there are some differences as follows:
The responce.redirect method redirects a request to new URL and specifies new URL whereas the server.transfer method request to terminate current page and start execution of new web page using the specifies new Url.
1: Response.Redirect can be used for both .aspx and HTML pages.
2: Server.Transfer can be used only for .aspx pages and is specific to ASP and ASP.NET.
both are used for same purpose
response.redirect will show us a round trip,i.e sends an HTTP request to the browser, then the browser sends that request to the web server, then the web server delivers a response to the web browser
server.transfer sends a request directly to the web server and the web server delivers the response to the browser.
Response.Redirect can be used for both .aspx and HTML pages whereas Server.Transfer can be used only for .aspx pages and is specific to ASP and ASP.NET. Response.Redirect can be used to redirect a user to an external website. ... You cannot use Server.Transfer to redirect the user to a page running on a different server.
Response.redirect works for both .Aspx and .html pages where as Server.Transfer is only specific to .Aspx pages
Response.Redirect is treated as independent request hence redirected to address(URL) present on other servers as well where as Server.Transfer is sticked to the address(URL) present on the same servers.
Response.Redirect() will send you to a new page, update the address bar and add it to the Browser History. On your browser you can click back.
Server.Transfer happens without the browser knowing anything, the browser request a page, but the server returns the content of another.
The Response.Redirect method redirects a reques the Server.Transfer method for the current request, terminates execution of the current page and starts execution of a new page using the specified URL path of the page.t to a new URL and specifies the new URL
Both serves the same purpose except in server.Transfer the Response Stream is not formed and the request is directly set toa new URI
Response.Redirect: It sends you to another page, update address bar and creates history link. One can return to previous page by hitting browser back button.
Server.trasfer: It sends you to another page on the same server without updating address bar. One cannot retrun to previous page by hitting browser back button
response.redirect is happen through browser and server.tranfer happen on server to server.