Response.Redirect, Server.Transfer and Server.Execute.


Someone, tell me the difference among these.
MCP Sergio Tarrillo
3/7/2005 6:41:06 AM 93655 articles. 6 followers. Follow

5 Replies

Similar Articles

[PageSpeed] 35
Get it on Google Play
Get it on Apple App Store


a response.redirect sends a notification to the browser that it should go to another webpage. It has a lot more traffic over the network.
server.transfer does a redirect on the server but doesn't notify the browser so the address in the address bar of your client's browser doesn't change. If you like to work with querystrings then this is out of the question to use.
server.execute can execute another page, or execute the page and grab its output and use it in stream depending on which overloaded method you use. Take a look at the example: HttpServerUtility.Execute Method.
Grz, Kris.
Read my blog. Handy Firefox plugins for web developers.

Workaround for non working Mark as answer buttons.
3/7/2005 8:26:48 AM
I tried to use Server.Transfer to point to a .doc or .rtf file on the server, it didn't give any notification of open or save... just load the file on to the page(unreadable characters), but it works fine with a .pdf file or a image. is there a method to popup a save/open dialog when the file type is not recognised?

Zero Wang
!Press any key to continue or any other key to quit.
8/22/2005 11:31:43 PM
That has to do with either the MIME types on the server or the settings on your browser.  By default, MS will attempt to open a .doc/.rtf/.txt in the browser.
8/26/2005 5:25:33 PM

Response.Redirect :
 It works at server, and server back MAC a url according to str(Response.Redirct(str))
then web browse connect to another page. In this way, Client and Server have to communicate 4 times

when server get this command. it will stop the current response.(like response.flush()), and write to client the new stream

it looks like Transfer. but when it finish the new stream, it will back to the last url.

Server.Transfer and Execute will not change the url in web browse's location bar but response.redirect

8/27/2005 3:46:21 PM


Response.redirect just navigates to another page. It's is similar to clicking a hyperlink.

Server.Transfer ends the current web form and begin executing a new web form.

Server.Execute begins executing a new web form while still displaying the current web form.The contents of both forms are combined.

abhishek sinha




abhishek kumar sinha
8/28/2005 8:59:02 AM

Similar Artilces:

Server.Transfer(), Response.Redirect(), Server.Execute()
Hi all, Please clarify the use for Server.Transfer(),Response.Redirect() and Server.Execute(). Or refer a good tutorial on them which clarify that what they all do. What's the difference and when to use which of them. thanks. Imran Ghani.Imran Abdul Ghani you know, I always find the documentation very useful for this kind of thing.RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadableJason Brown - MVP, IIS...

Access local server(LAN Server) from Web Server(Web Application Server)
Hello All I have a local server for my LAN and a Web server(at remote location).Is it possible to access my Local Server from my Web Server ? Thanks MS  ...

Server.Transfer and Server.Execute
Hi there I am trying to using one of this 2 methods and it's basically I need to run the transfer/execute after the current complete finish. The reason I am doing I had Google Analytics and needs to execute before passing another page. if I put into Page_Load and then transfer() or execute() ... the front end code is not going to run ... isn't ? Any comment or anything I am really appreciated. Thanks onloadcompeleteMatthew M. Osbornhttp://blog.osbornm.com"Change the world or go home." Are you sure about this? Cause I've just put a a...

server.execute() and server.transfer()
what are the differences (if any) between using server.execute() and server.transfer() ? also: in response to a postback, is it possible to use server-side code to invoke a new browser window that contains new .aspx content -- keeping the current browser window & current .aspx intact -- and making this new browser window the active browser window ? While I have never used Server.Execute, my interpretation is that it runs the rendering process of the page you supply and returns to the calling page. Server.Transfer never returns to the caller. I like the example given on the .net docs...

Server.Transfer / Response.Redirect & forms authentication
Hi, thank you in advance for any support. I have confused myself with this one and would be gratefull if anyone could explain. I have a site employing forms authentication, in my root directory there is a web.config that has <allow users="*" /> and in a subdirectory called secure there is another web.config that has <deny users="?" /> . Whenever I try to access a file in the secure folder directly by typing in the url it redirects me to login.aspx as intended then once successfully logged in RedirectFromLoginPage back to requested page. On my default...

Server.Execute vs Server.Transfer
I've used Server.Transfer to go from page to page, but Server.Execute returns control to the caller. Even though I can call an aspx page using Server.Execute: 1. will a form appear 2. can I work with the form 3. how do I return control back to the caller. --OR-- Is Server.Execute just for running code in an aspx page, then returns immediately like a subroutine or funtion? If so, why not use a subrtne or function w/in the calling program?? Thanx Jerry ASP.NET 101: look in the documentationRTFM - straight talk for web developers. Unmoderated, uncensored, occasionall...

Server.Execute vs Server.Transfer
Hello, I have read that you can workaround the common problem of the Thread.Abort exception by using the server.execute method instead of server.transfer when transfering to another page. I started using server.transfer in order to make the URLReferrer property of the HTTP request show up properly when using smart navigation in the app. This worked fine, but I get the Thread.Abort execeptions now and then. Will server.execute still allow the HTTP Request to contain a valid URLReferrer value like the server.transfer call did? Thanks. From the docs (

aspx form works in Visual Studio web server but not on my main IIS web server.
Hi all,  I have a simple form that works fine in the VS local web server but when I copy the files (index.aspx, index.aspx.vb, web.config) to my IIS server I can see the form but when I click the hyperlink the form doesn't work. It is as if the .aspx can't execute the .aspx.vb page. Any ideas why this would be?  This is my first project so I am a complete novice here. Thanks.  My aspx code: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="login.aspx.vb" Inherits="Default2" %> <html xmlns=...

Response.redirect not working on the page redirected to by using server.transfer
I am  using server.transfer to redirect from one aspx page to other aspx  so that i can access the httpcontext values from the parent page.I am using server.transfer to come back to the parent to persist with the values selected by the user on the form(I am not using history.back to have serverside control).  But the problem I am facing is that after coming back to the parent aspx page using server.transfer, when I try going from here(parent page) to some other page using response.redirect then it is showing a blank white page and not going any where else.Proble...

How to pull data from a remote server to the web server. Initiated by the web server session.
Hello.I am brand new to Just starting to do web development. However I do have extensive software experience developingapplications on local networks, mobile devices,, remoting,etc. Here is the senario:    Bob delivers bottled water to several hundred accounts.    Bob keeps all information regarding his accounts in an    SQL server located at site A.  Bob has an application    hosted on a web server at site B.  Bob wants to allow his     accounts to log in to the web serve...

transferring from server to server
I've just finished making a page and testing it and everything and i wanted to load it onto the final server. Our computers are networked and i have been making everything on my laptop--where i downloaded all the requirements to make it act as the server so i could make the page. My question is how do i get the page up and running on the internet from this network. For some reason, everytime I've started webmatrix after the first time i logged on to start web application under the web matrix server, not using/creating an IIS virtual port, it won't allow me the option. I'm really ...

Server.Transfer or Response.Redirect
I'm using GoDaddy as a host (yah I know people don't like them...thus far they've been cheap and effective in my hosting.). Anyway, they won't allow the primary domain on the hosting account (windows shared) to point to a directory.  The only option is to configure it to the root.  I have 2 other websites on the same hosting so I'm trying to keep them organized by using sub directories. I called their tech support and they told me I could use an ASP Server Side redirect to make the domain point to the default.aspx page within the directory...however they to...

response.redirect() and server.transfer()
 hi,      i know the difference between server.transfer() and respone.redirect(). server.transfer() is faster then response.redirect() as per performance but most of them use the response.redirect(). in my company project also using the response.redirect().... Why? Many times i ask this questions know one will give the exact answer... any body plz tel me...     Response.Redirect is more user-friendly, as the site visitor can bookmark the page that they are redirected to. Transferred pages appear to the client as a different url than they reall...

Server.Transfer or Response.Redirect
Hello All, After the user logs in. In the protected page when the user clicks on any of the buttons it logs the user out. It's not because the user does not have permission. I've tried Server.Transfer and Response.Redirect Private Sub btnRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRegister.Click 'Server.Transfer("Register.aspx") Response.Redirect("Protected.aspx") End Sub What the heck? Mike Mike, Are you authenticating the user at any point? If not try using the f...

Web resources about - Response.Redirect, Server.Transfer and Server.Execute. -

Wikipedia:Redirect - Wikipedia, the free encyclopedia
This page documents an English Wikipedia editing guideline . It is a generally accepted standard that editors should attempt to follow, though ...

Asteroid Redirect Mission: Boulder Collection Concept - YouTube
This animation illustrates one of two robotic mission concepts under consideration for NASA's Asteroid Redirect Mission. In this concept, the ...

CloudFlare boss’s Gmail hacked in redirect attack on 4Chan
Content distribution network CloudFlare reset all its customer API keys over the weekend after its CEO’s personal and corporate Gmail was breached ...

Return to sender: is it really that hard to redirect your mail when you move?
Scrawling &quot;return to sender&quot; on past residents' mail is getting old, writes Meena Evers.

Parramatta shootings: We need to redouble our efforts to redirect all at-risk teens from a destructive ...
He was too young to drive, and too young to vote. We may discover why he killed, but we may not. What we can do is boost our efforts to divert ...

Budget 2015: Generic drug prices expected to fall as Government redirects health spending
Patients will benefit from a significant drop in the price of many common drugs with changes due in next week's budget.

Redirect 'spying,' ad funds to student jobs, Tories told
The federal government is highlighting its funding for student summer jobs at the same time it has come under fire from the opposition for the ...

Colorado governor candidate redirects volunteers to Douglas County races
KUSA-Republican gubernatorial candidate and current Colorado Secretary of State Scott Gessler is wading into a local school board election. ...

China’s ‘Great Cannon’ Uses DDoS Style Redirects for Censorship
... the great firewall works to block traffic by terminating links; it can’t alter the traffic, just stop it. The great cannon modifies and redirects ...

Apple - Redirect to Terms
Apple - Redirect to Terms

Resources last updated: 11/21/2015 9:35:33 PM