RSS

Server.Transfer() vs. Reponse.Redirect() in ASP .NET

26 Dec

Server.Transfer()

  • Server.Transfer() is used to navigate between the pages of the same site only.
  • Server.Transfer() transfers the information by itself from a page to another.
  • It uses QueryString internally to transfer the information from a page to another within the same site.
  • When you try to use this method (Server.Transfer(“MyWebForm.aspx”)) executed, and you are in another page called “TestPage.aspx” notice this “While navigation to any page the URL in address bar of your browser will not changed”.

Response.Redirect()

  • Response.Redirect() is used to navigate between the pages of the same site and more than on site (any URL).
  • Response.Redirect() not transfers the information by itself from a page to another.
  • It uses QueryString externally to transfer the information from a page to another.
  • When you try to use this method (Response.Redirect(“MyWebForm.aspx”)) executed, and you are in another page called “TestPage.aspx” notice this “While navigation to any page the URL in address bar of your browser will changed”.
 
Leave a comment

Posted by on December 26, 2011 in ASP .NET

 

Tags: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: