473,396 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Response vs Server ???

Dear all,

I have a problem to identify when I need to use
Response.Redirect("mypage.aspx") or Server.Transfert("myPage.aspx") ?

Does any one have any tips for remembering ?

regards
thanks
serge
Nov 19 '05 #1
3 1069
Server.Transfer switches to the other page mid-request from the client's
perspective. Since it's all server side, the client has no idea the server's
done this. The URL in the browser will be the first page.

Response.Redirect sends back a 302 (IIRC) and a location for the new page
to request. So the browser makes a second request into the server for the
other page. The URL in the browser will be that of the second page since
the browser had to make the second request.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Dear all,

I have a problem to identify when I need to use
Response.Redirect("mypage.aspx") or Server.Transfert("myPage.aspx") ?

Does any one have any tips for remembering ?

regards
thanks
serge

Nov 19 '05 #2
Thanks brok for your answer, but I forgot to tell you that I am beginer in
asp and I did not catch what you are saying, do you have a simple way ?

When I should use one compare to the other?

I am just learning ASP and try to understand clearly each things in order t
prepare my exams. And as long as one thing in not clear in my mind I am not
able to go further.

Thanks if you cold clarify your answer for a beginner

regards
serge

"Brock Allen" wrote:
Server.Transfer switches to the other page mid-request from the client's
perspective. Since it's all server side, the client has no idea the server's
done this. The URL in the browser will be the first page.

Response.Redirect sends back a 302 (IIRC) and a location for the new page
to request. So the browser makes a second request into the server for the
other page. The URL in the browser will be that of the second page since
the browser had to make the second request.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Dear all,

I have a problem to identify when I need to use
Response.Redirect("mypage.aspx") or Server.Transfert("myPage.aspx") ?

Does any one have any tips for remembering ?

regards
thanks
serge


Nov 19 '05 #3
In that case, I'd suggest using Response.Redirect -- I use that much more
than I use Server.Transfer. In essence it's simply saying that your page
has decided that the user should go somewhere else (to a different page).

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks brok for your answer, but I forgot to tell you that I am
beginer in asp and I did not catch what you are saying, do you have a
simple way ?

When I should use one compare to the other?

I am just learning ASP and try to understand clearly each things in
order t prepare my exams. And as long as one thing in not clear in my
mind I am not able to go further.

Thanks if you cold clarify your answer for a beginner

regards
serge
"Brock Allen" wrote:
Server.Transfer switches to the other page mid-request from the
client's perspective. Since it's all server side, the client has no
idea the server's done this. The URL in the browser will be the first
page.

Response.Redirect sends back a 302 (IIRC) and a location for the new
page to request. So the browser makes a second request into the
server for the other page. The URL in the browser will be that of the
second page since the browser had to make the second request.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Dear all,

I have a problem to identify when I need to use
Response.Redirect("mypage.aspx") or Server.Transfert("myPage.aspx")
?
Does any one have any tips for remembering ?

regards
thanks
serge

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jon Spivey | last post by:
Experimenting with response.flush() but can't seem to get it to work. This code <% response.write "<p>started</p>" response.flush() for i = 1 to 10000000 i = i +1 next response.write...
13
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
5
by: Paul de Goede | last post by:
I set the Response.Filter in my aspnet application but I have noticed that if you do a Server.Transfer that the filter doesn't get called. And in actual fact the response is mostly empty. It seems...
3
by: Jocelyn Duhaylungsod | last post by:
I have been getting the following server errors sporadically while downloading excel, csv or xml file. Internet Explorer cannot download <file name> from <IP address> "The server returned an...
1
by: emielvl | last post by:
Hello, I'm developing a client/server architecture based on the XML-RPC implementation in php4. All works pretty well, except that in the response from the server there is no "Content-Length" in...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
5
by: twiggy182 | last post by:
Hi, I really need you help because I'm not very familliar with ASP and I could not find any solution to my problem. To put you in situation, I have a CGI to which I send a file name, and that...
4
by: cbtechlists | last post by:
I have an ASP app that we've moved from a Windows 2000 to a Windows 2003 server (sql server 2000 to sql server 2005). The job runs fine on the old servers. Part of the app takes a recordset and...
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.