differnence between Response.Redirect() and Server.Transform() Flow between Request and Response

Hi

What is the differnence between Response.Redirect() and Server.Transform() 

Some body telling Response.Redirect will increase one request between client and Web Server

Can anyone explain detail the Flow.(between Request and Response)

Regards,

Janakaraj 

 

0
janakaraj
10/26/2007 1:30:46 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies
757 Views

Similar Articles

[PageSpeed] 13

Server.Transfer just tells ASP.NET to now move to a new page, much like setting focus. The client is not aware of this at all so the URL stays the same. This can be a disadvantage.

Response.Redirect actually tells the client we are going to redirect your request to a new page hence there is extra overhead in adding new headers etc

have a read of the following links

http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=15

http://www.developer.com/net/asp/article.php/3299641

http://www.codeguru.com/csharp/.net/net_asp/miscellaneous/article.php/c5359/ 

0
jimmy
10/26/2007 1:53:24 PM

janakaraj:
What is the differnence between Response.Redirect() and Server.Transform() 
 

Do you mean Server.Transfer? If so, the difference is who actually changes the page. In the Response.Redirect method, the client request a new page and is forwarded to that URL. In the Server.Transfer method, the server actually sends the new page to the client without them requesting it (so they will still see the same URL in their browser window).


Website Design Darlington - http://mdssolutions.co.uk
http://lessthandot.com - Experts, Information, Ideas & Knowledge
http://aspnetlibrary.com - An online resource for professional ASP.NET developers


Please remember to click "Mark as Answer" on this post if it helped you

0
ca8msm
10/26/2007 1:55:31 PM

Request And Response: http://www.startvbdotnet.com/aspsite/forms/response.aspx

Architechture of Asp.net: http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp

 Response.Redirect and Server.Transfer:

http://www.developer.com/net/asp/article.php/3299641

 

 


Thanks,
Karan

~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
0
karan
10/26/2007 2:00:09 PM

Here you go...

1. Server.Transfer conserves server resources. Instead of telling the browser to redirect, it simply changes the "focus" on the Web server and transfers the request. This means you don't get quite as many HTTP requests coming through, which therefore eases the pressure on your Web server and makes your applications run faster.

Please note that you can't use Server.Transfer to send the user to an external site. Only Response.Redirect can do that.

2. Server.Transfer maintains the original URL in the browser. This can really help streamline data entry techniques, although it may make for confusion when debugging.

The Server.Transfer method also has a second parameter—"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to but not the case with Response.Redirect.


-Sri
-------------------------------------------------
If this post was useful to you, please mark it as answer. Thank you!
0
ksridharbabuus
11/22/2007 6:33:14 AM
Reply:

Similar Artilces:

No response from response.redirect
Hi, my asp.net project has atleast 10 webforms and for navigation the response.redirect was working fine till today. It stopped working in one of the pages but stills fine in the other pages. eg. the CANCEL button loads the previously navigated page. All CANCEL except one are working. I checked the button click event, put labels with messages in them; the labels get posted when the button is clicked; but when i remove the labels and put in the response.redirect("PAGE NAME") it stopped working; i even put the wrong path in the response.redirect, still the errorhandler or any o...

chat application listening response from server (no response/request every second)
Hello , I want to learn the technique (or some keywords to start searching)  of a chat application which doesnt request and get response every second . For example https://www.jabbify.com/ (also faceboox chat application works like that ) has a chat box right down corner of the page .I have examined it with fiddler and it seems that sending request to the server is made when I send a message but no activity is seen every second . It seems that the chat box is listening server and when sth. is sent to the user an activity fires at server side . So how it is done . Some keywords ma...

web form
I have a web form with some text boxes with validation to ensure that data has been entered. I have two buttons one for "submit" and one for "Return to main". When I click on submit - all works OK as it should with asking the user to enter data for the text boxes. However, when I click "Return to main", instead of redirecting to the main page, the validation requirements for the form appear. Here is some of my code... <table> <tr> <td valign="top" style="width: 318px"><asp:TextBox id="txtTextBox1" runat=&quo...

Forms Authentication
Hi I am creating a new Website Application that redirects the logged in user to a webpage based upon the role to which he belongs programatically in 'Authentication' event. I have designed the app. so that a User can belong to a single role at one time and I am using membership provider.  I have a web page that is stored in the rootfolder which is accessible by all users(including unauthenticated users). This webpage contains different menuitems and one of them is 'login'.  So If user A belongs to Role 'abc', he is redirected to a webpage in folder abc. S...

try catch finally / response.redirect / response.end flow control question
Hi Guys, Can any one tell me if the finally block would be executed in the following example (assuming that dbReader.read() returned false because no records were found).   Many Thanks! DanielTry dbCon = New SqlConnection(myconnectionstring) dbCon.Open() dbCom = dbCon.CreateCommand() strSQL + "SELECT * FROM bookings WHERE ID &gt; 9000" dbCom.CommandText = strSQL dbReader = dbCom.ExecuteReader() If dbReader.Read() Then 'init fields Else Response.Redirect("main.aspx") End if Finally dbReader.clo...

Diferences Between Page.Request/Response and Context.Request/Response
Hi people... I noticed that you have the Request, Response, Application and Session Objects both in the Page object and in the context object... The help distinguish the two like this: Page.Request: Gets the System.Web.HttpRequest object for the requested page. Context.Request: Gets the System.Web.HttpRequest object for the current HTTP request. Using any of the two, the output would be the same... So I ask, what's the difference on using these objects called from the Page or from the Context object? Thanks, Rafa® Generally, I use the Page members from any Web ...

Response.write or Response.redirect?
I have a code using Response.Write and javascript to open another page, the code looks like this: Response.Write("<Script language='javascript'>window.open('http://10.10.30.25:8080/Orders/Orders.aspx?vloc=fac&vflag=" & Session("varflag") & "&vid=" & Session("FacilityID") & "&vrepid=" & Session("varid") & "');</script>") it send me to another page in a different window or tab. I want to open it in the same window or tab as in Response.Redirect, but in Respons...

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...

Response.Redirect, Server.Transfer and Server.Execute.
Hi. Someone, tell me the difference among these.MCP Sergio Tarrillo Hi, 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 yo...

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...

Should we use Response.Redirect ( url, true) or Response.Redirect ( url, false) ?
Normally most of the time we use Response.Redirect (url). How is this different from Response.Redirect ( url, true) or Response.Redirect ( url, false) ? Also, what is the best form of Redirect to use when going to another page?sun21170 The second parameter of Response.Redirect is endResponse which is boolean value that indicates whether to stop running the current page.It depends on if you want to keep it alive or stop it.Thanks Mark post(s) as "Answer" that helped youElectronic ScrewWebsite||Blog||Dub@i.net In what situation, would someone pass a true for the endResponse ...

CustomErrors not generating Response.Redirect in Page_error event
I am using Visual Web Developer 2005 Express and  the integrated development web server (which i think is known as Cassini).My problem is connected with creating custom error pages. i have the following section in the root web.config file <system.web><customErrors defaultRedirect="~/SiteError.aspx" mode="on">    <error statuscode="404" redirect="~/htmlPage.htm" /></customErrors> ..... what i think should happen is that the DefaultRedirect should insert a "Response.Redirect="~/...

Using Response.Redirect() after Response.Flush()
I wonder if anyone might be able to help me with a problem I'm having in redirecting to a new page after calling Response.Flush(); The problem has arisen as a side effect of implementing a "Please Wait..." page that displays when clicking on a Search button. The following code is executed when the button's Click event is run: private void btnConfirm1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { btnConfirm1.Visible = false; Response.Buffer = true; FileStream oFile = new FileStream(Request.PhysicalApplicationPath + "/Con...

Response.Redirect after response.OutputStream.Write?
I'm using the Wrox Docs module from Building An ASP.NET Intranet. This code outputs the doc from the DB to the client Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ItemID As Integer = -1 Dim strTable As String = "parent" Dim DocsSec As New WroxDocSecurity() 'comment this code if you don't want to lock down the download process If Not (DocsSec.HasDocPermissions(DocumentPermissions.DownloadandViewOnly, Request.Params("key"))) _ ...

Web resources about - differnence between Response.Redirect() and Server.Transform() Flow between Request and Response - asp.net.web-forms

The Accidental Explorer
Adventure travel, photography, filmmaking, and storytelling. Exploring the world... intentionally or not.

Working Families Party Recruits ACORN Rent-A-Mobs for #OccupyWallStreet
Working Families Party Recruits ACORN Rent-A-Mobs for #OccupyWallStreet

Political party paying Occupy Wall Street protesters?
My friend Scott Johnson got a tip from a reader that the progressive New York political party Working Families has run an ad on Craigslist , ...

WFP wants you to “MAKE A DIFFERNENCE” for #OWS?
Mean of me to note the bad spelling in this let’s-just-screenshot-this-now Craigslist post from NY’s Working Families Party advertising for… ...

Astroturf occupiers being paid to protest
From Hot Air: My friend Scott Johnson got a tip from a reader that the progressive New York political party Working Families has run an ad on ...

Medicare Under Paul Ryan's Budget Plan
... his budget proposal today. In many ways, the plan resembles the budget proposals Ryan has been putting forth for years. One major differnence, ...

Right-Wing Sites Succumb To Silly Occupy Wall Street Conspiracies
A wave of reports "exposing" the secret liberal money behind the Wall Street occupation has been cresting over the...

Truth Before Dishonor
... ties to ACORN and the radical Left (including “Progressive” Democrats and Unions), is paying people to protest Wall Street and make a “differnence”. ...

Resources last updated: 11/26/2015 5:44:25 AM