473,287 Members | 1,613 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,287 software developers and data experts.

Response.Redirect or Server.Transfer?

Hi,

Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are the
proper usages of the two methods that seems working
similar..

The problem i faced while using Response.Redirect is that
the page that is directed to, does not looks as
desired..the textboxes are not visible anymore and so as
the fonts which look different.

For Server.Transfer. I cant refresh my page...

The other thing is that; is it possible for me to
redirect / change two frames at the same time..?

Thanks in advance
Nov 17 '05 #1
3 9043
Hi Justin,

Response.Redirect and Server.Transfer are 2 different
systex to form different work.

Response.Redirect would redirect you page to a desired URL
without taking the value of the form from where it is
being redirected. Means you can use redirect method to
link another URL also eg if you are working on site say
justin.com so here you can use redirect method and get
connected to hotmail.com also. Where as in Server.Transfer
you are not doing as redirect, infact in this you have a
hold on the values of previous form and which you can
access at new transfered page.

Note: In server.transfer you can not transfer control
to .htm, .HTML, .ASP page. it's only for .ASPX page.

regarding your doubt of redirecting to 2 frames, what you
can do is you can redirect it to a frameset, but it's not
possible to redirect to 2 different frames.

Hey justine i hope this would help you. Please fill free
to contact if may need my help.

Thanks

Regards
Vivek Jain
-----Original Message-----
Hi,

Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are theproper usages of the two methods that seems working
similar..

The problem i faced while using Response.Redirect is that
the page that is directed to, does not looks as
desired..the textboxes are not visible anymore and so as
the fonts which look different.

For Server.Transfer. I cant refresh my page...

The other thing is that; is it possible for me to
redirect / change two frames at the same time..?

Thanks in advance
.

Nov 17 '05 #2
Response.Redirect sends a response back to the client browser, telling it to
request the page redirected to. Server.Transfer happens on the server-side,
and without the browser being involved, transfers execution of the current
Request to another Page class. How the page redirected to looks has nothing
to do with Response.Redirect; it has to do with your Page Class code.

Changing 2 frames at once is done the same way as with any frameset using
HTML pages. You must use JavaScript on the client to do this. Here's an
example:

function change2frames {
window.parent.frameName1.location = "someUrl";
window.parent.frameName2.location = "someOtherUrl";
}

<a href="javascript:change2frames()">Click here</a>

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.

"Justin" <yy****@hotmail.com> wrote in message
news:0c****************************@phx.gbl...
Hi,

Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are the
proper usages of the two methods that seems working
similar..

The problem i faced while using Response.Redirect is that
the page that is directed to, does not looks as
desired..the textboxes are not visible anymore and so as
the fonts which look different.

For Server.Transfer. I cant refresh my page...

The other thing is that; is it possible for me to
redirect / change two frames at the same time..?

Thanks in advance

Nov 17 '05 #3
Response.Redirect - sends a redirect back to the browser. This means the
browser does the call for the next page.
Server.Transfer - client ask for page 1 and the server transfer them to page
2 without their knowledge (the address bar still says page1.aspx)

Which to use depends on a lot of factors:

1. Do I want the user to be able to bookmark the second page?
Response.Redirect
2. Do I want to hide the second page? Server.Transfer

It can get much more complex (many more questions).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"Justin" <yy****@hotmail.com> wrote in message
news:0c****************************@phx.gbl...
Hi,

Im confused here over the usage of Response.Redirect and
Server.Transfer. I used frameset for my work, what are the
proper usages of the two methods that seems working
similar..

The problem i faced while using Response.Redirect is that
the page that is directed to, does not looks as
desired..the textboxes are not visible anymore and so as
the fonts which look different.

For Server.Transfer. I cant refresh my page...

The other thing is that; is it possible for me to
redirect / change two frames at the same time..?

Thanks in advance

Nov 17 '05 #4

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

Similar topics

11
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
6
by: \A_Michigan_User\ | last post by:
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors? 1. Client-side VBscript code: call navigate("\\209.11.22.33\MyDir") 2. Client-side VBscript code: location.href...
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...
4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
3
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan...
10
by: Bill | last post by:
In file FIRST.ASP, I've got <% Response.Redirect "SECOND.ASP" %> The redirect is happening, and I'm seeing the content from SECOND.ASP in the browser, but the URL in the browser is still...
2
by: Nathan Sokalski | last post by:
The last two lines of code in the Click event of a Button Control on my page are: Me.WelcomeEmail() Response.Redirect("mainmenu.aspx") The last line of code in Me.WelcomeEmail() is:
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)....
3
by: jasonheath.net | last post by:
I apologize in advance for the length of this post. I wanted to get as much detail as possible in here. We have 1 web app that contains the functionality to do some single sign-on logic. The...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.