ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the difference between responce.redirect and server .transfer?

user-image
تم إضافة السؤال من قبل Rachana Koyyedi
تاريخ النشر: 2015/06/24
Dilip Raut
من قبل Dilip Raut , Senior software Engineer , PCS (P) Ltd.

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.

Shaikh Mohammad Asif Zafre Alam
من قبل Shaikh Mohammad Asif Zafre Alam , software engineer , Inceptio systems DMCC

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.

muhammed shameej chelakodan
من قبل muhammed shameej chelakodan , IT & ERP Specialist , M.A Al AbdulKarim Co & Ltd

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.

nilesh sawardekar
من قبل nilesh sawardekar , Director , Infobytes Solutions

  • response.redirect is used the url in the address bar changes and the browser history in maintained.
  • response.redirect is used to nevigate pages/websites on the same server or on a different web server.
  • server.transfer is used to nevigate pages/websites on the same server and cannot navigate to a different web server.
  • server.transfer doesnt change the url in the address bar.
  • server.transfer is faster than response.redirect as the redirection happens on the server in one request/respnse cycle. response.redirect involves 2 requests/response cycles.
  • with server.transfter the Form Variable from the original request are preserved.

Mudassir hassan Rajpoot
من قبل Mudassir hassan Rajpoot , I.T Manager , Boss Moulded Furniture

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.

Asif Ali Khan Pathan
من قبل Asif Ali Khan Pathan , senior software Engineer , CGI Information systems

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.

samir aoua
من قبل samir aoua , Developer logiciel , ALL

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.

Bahadur ali Syed
من قبل Bahadur ali Syed , Senior Software Engineer , Aljouf University

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 

 

Subhasish Mukherjee
من قبل Subhasish Mukherjee , Manager , FI-TEK PVT. LTD

Both serves the same purpose except in server.Transfer the Response Stream is not formed and the request is directly set toa new URI

Shariq Muhammad
من قبل Shariq Muhammad , Manager , Feroze1888 Mills Limited

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

Muhammad Rehan khan
من قبل Muhammad Rehan khan , Technical Analyst , First Abu Dhabi Bank

response.redirect is happen through browser and server.tranfer happen on server to server.

المزيد من الأسئلة المماثلة