Wrox Programmer Forums
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 10th, 2008, 07:24 AM
Authorized User
Join Date: Sep 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server.Transfer vs. Response.Redirect

I noticed that in order to go from page to page the downloaded code always uses response.redirect except in one case. I am curious about two things:

1. Why use server.transfer for SwitchApplication.aspx and response.redirect in all other cases?

2. Is the use of server.transfer the reason that the URL line doesn't show SwitchApplication.aspx when switching applications?


Old April 10th, 2008, 08:07 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

Yes, when you use Server.Transfer, the page is transferred at the server, so the address bar at the client is not updated.

Server.Transfer is used for exactly that reason: to keep the existing URL in the browser. However, Response.Redirect would have worked as well.....


Imar Spaanjaars
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Old April 10th, 2008, 04:18 PM
Authorized User
Join Date: Sep 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for the fast response.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Diff bet Response.Redirect and Server.Transfer alienaheart ASP.NET 1.0 and 1.1 Basics 1 October 2nd, 2008 12:51 AM
Server.Transfer and Response.redirect lavanyarl ASP.NET 1.x and 2.0 Application Design 1 November 9th, 2004 03:31 AM
Differenc Between Redirect and Transfer qadeerahmad General .NET 1 August 17th, 2004 02:18 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.