Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > What is the difference?

Reply
Thread Tools

What is the difference?

 
 
odwrotnie
Guest
Posts: n/a
 
      08-01-2006
Hi,

what is the difference between
Response.Redirect("Stop.aspx");
and
Server.Transfer("Stop.aspx");
?

--
Best regards,
Odwrotnie.
 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      08-01-2006
"odwrotnie" <> wrote in message
newsp.tdlqebmvdvqlmf@odwrotnie...

> what is the difference between
> Response.Redirect("Stop.aspx");
> and
> Server.Transfer("Stop.aspx");


1) Launch your Internet browser (IE, FireFox, Netscape, Opera etc)

2) Navigate to http://www.google.com

3) Enter the text below in the box:

"Response.Redirect" "Server.Transfer" difference

4) Hit the button


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      08-01-2006
Classic.
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Mark Rae" wrote:

> "odwrotnie" <> wrote in message
> newsp.tdlqebmvdvqlmf@odwrotnie...
>
> > what is the difference between
> > Response.Redirect("Stop.aspx");
> > and
> > Server.Transfer("Stop.aspx");

>
> 1) Launch your Internet browser (IE, FireFox, Netscape, Opera etc)
>
> 2) Navigate to http://www.google.com
>
> 3) Enter the text below in the box:
>
> "Response.Redirect" "Server.Transfer" difference
>
> 4) Hit the button
>
>
>

 
Reply With Quote
 
Patrick.O.Ige
Guest
Posts: n/a
 
      08-01-2006

Easy
Patrick

"Peter Bromberg [C# MVP]" <> wrote in message
news:3F390BE4-F337-4B09-886F-...
> Classic.
> --
> Co-founder, Eggheadcafe.com developer portal:
> http://www.eggheadcafe.com
> UnBlog:
> http://petesbloggerama.blogspot.com
>
>
>
>
> "Mark Rae" wrote:
>
>> "odwrotnie" <> wrote in message
>> newsp.tdlqebmvdvqlmf@odwrotnie...
>>
>> > what is the difference between
>> > Response.Redirect("Stop.aspx");
>> > and
>> > Server.Transfer("Stop.aspx");

>>
>> 1) Launch your Internet browser (IE, FireFox, Netscape, Opera etc)
>>
>> 2) Navigate to http://www.google.com
>>
>> 3) Enter the text below in the box:
>>
>> "Response.Redirect" "Server.Transfer" difference
>>
>> 4) Hit the button
>>
>>
>>



 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      08-01-2006
Response.Redirect sends to the client with a META redirect and the client
requests the next page. Server. Transfer is solely on the server side.

Benefit of Reponse.Redirect: User can bookmark the redirected page

Benefit of server.Transfer: faster, as there is no trip to the client

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"odwrotnie" <> wrote in message
newsp.tdlqebmvdvqlmf@odwrotnie...
> Hi,
>
> what is the difference between
> Response.Redirect("Stop.aspx");
> and
> Server.Transfer("Stop.aspx");
> ?
>
> --
> Best regards,
> Odwrotnie.



 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      08-01-2006
Proving, I guess, that asking questions in this group is stupid? Or, perhaps
the questions you think are stupid do not deserve answering until the day
google dies?

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Mark Rae" <> wrote in message
news:...
> "odwrotnie" <> wrote in message
> newsp.tdlqebmvdvqlmf@odwrotnie...
>
>> what is the difference between
>> Response.Redirect("Stop.aspx");
>> and
>> Server.Transfer("Stop.aspx");

>
> 1) Launch your Internet browser (IE, FireFox, Netscape, Opera etc)
>
> 2) Navigate to http://www.google.com
>
> 3) Enter the text below in the box:
>
> "Response.Redirect" "Server.Transfer" difference
>
> 4) Hit the button
>



 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      08-01-2006
"Cowboy (Gregory A. Beamer)" <> wrote in
message news:...

> Proving, I guess, that asking questions in this group is stupid? Or,
> perhaps the questions you think are stupid do not deserve answering until
> the day google dies?


Nope - merely trying to encourage people not to quite so lazy...

If the OP had done a simple Google search, they'd have had their answer
immediately rather than having to wait nearly two hours for you to tell
them...


 
Reply With Quote
 
odwrotnie
Guest
Posts: n/a
 
      08-01-2006
On Tue, 01 Aug 2006 13:20:39 +0200, Mark Rae <>
wrote:

> Navigate to http://www.google.com


I just wanted to have a discussion here!
It is strange for me why Profile.Value can pass values only with Transfer
.

--
Best regards,
Odwrotnie.
 
Reply With Quote
 
odwrotnie
Guest
Posts: n/a
 
      08-01-2006
On Tue, 01 Aug 2006 14:56:42 +0200, Cowboy (Gregory A. Beamer)
<> wrote:

> Response.Redirect sends to the client with a META redirect and the client
> requests the next page. Server. Transfer is solely on the server side.


So how this transfer works? Is it have something in common with AJAX? And
why does the address stays unchanged with transfer?

> Benefit of server.Transfer: faster, as there is no trip to the client


If there is no trip to the client, how does it works that the page is
displayed?

--
Best regards,
Odwrotnie.
 
Reply With Quote
 
Nick Malik [Microsoft]
Guest
Posts: n/a
 
      08-01-2006
"odwrotnie" <> wrote in message
newsp.tdlzejlzdvqlmf@odwrotnie...
> On Tue, 01 Aug 2006 14:56:42 +0200, Cowboy (Gregory A. Beamer)
> <> wrote:
>
>> Response.Redirect sends to the client with a META redirect and the client
>> requests the next page. Server. Transfer is solely on the server side.

>
> So how this transfer works? Is it have something in common with AJAX? And
> why does the address stays unchanged with transfer?
>
>> Benefit of server.Transfer: faster, as there is no trip to the client

>
> If there is no trip to the client, how does it works that the page is
> displayed?
>


The asp.net model is based on the page controller pattern. ASP.Net provides
a page controller that gets the request, finds and executes the page, and
returns the HTML stream. Server.Transfer changes that flow.

So instead of this:
Controller gets request
Controller finds requested page
Controller loads and executes page
Controller wraps output of page in HTTP protocol and ships it back

You get this
Controller gets request
Controller finds requested page
Controller loads and executes page
Page tells controller to find a new page
Controller finds transferred page
Controller loads and executes page
Controller wraps output of page in HTTP protocol and ships it back

All this happens server side. The client is still waiting on their original
request and has no idea that it has occurred. It is quite normal for there
to be pages on the server that are ONLY accessible by server.transfer, where
the client gets the output but never sees the URL.

No, this has nothing to do with the Ajax model, although this mechanism can
be used for any web interaction, including Ajax, limited only by the
creativity of the developers and the requirements of the app.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57