Server.Transfer / Response.Redirect(blogs.msdn.com)

submitted by wisemxwisemx(8074) 3 years, 7 months ago

Server.Transfer and Response.Redirect are causing a new page to be processed, but the big difference is how they are doing it. - Server.Transfer terminates the execution of the current request (Response.End) and begins execution of a new request using the supplied url. No trip back to client is performed. - Respose.Redirect creates a special header, sends it to the client to ask the server for a different page. o Response.Redirect(url) == Response.Redirect(url, true). In this case, right after creating the header, the page execution is done – Response.End is called, and this one causes the current thread to be aborted (ThreadAbortException will be thrown). o Response.Redirect(url, false) doesn’t abort the thread, so it is recommended because it avoids the exceptions. This form is used for example by FormsAuthentication.RedirectFromLoginPage method.

add a comment |category: |Views: 18

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:

No comments so far

information Login or create an account to comment on this story