ASP.NET - Server.Transfer v/s Server.Execute (techahead.wordpress.com)

published 2 years, 3 months ago, submitted by prashantvictoryprashantvictory(600) 2 years, 3 months ago

Difference between Server.Transfer and Server.Execute.

3 comments | category: | Views: 61

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

posted by senfosenfo(870) 2 years, 3 months ago

I have yet to have a valid use for Server.Execute(), so if anybody has any good examples, I'm all ears.

posted by usshermussherm(5255) 2 years, 3 months ago

I still want to know why you wouldn't just use a Redirect. It seem to me that leaving the original URL in the browser via a Server.Transfer could be a huge PITA and have many un-intended consequences... like what happens if the user refreshes the page?

posted by simonebsimoneb(5440) 2 years, 3 months ago

DotNetKicks uses it in the Global.asax file, to handle error pages, you might want to check it out. About what happens when the user refreshes the page, nothing weird, the url in the address bar is requested again and the logic of the page begins from scratch, reissueing eventual Transfers or Executes.

information Login or create an account to comment on this story