473,657 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Frame for Response.Driect or Server.Transfer

This is driving me mad so any help will be much appreciated.

I have an html page with 3 frames, banner, left and right. The banner frames
source is an aspx page. The aspx page has two buttons, both need to run some
code and then redirect the user somewhere else. The problem is the redirected
page is being displayed in the banner frame. How do I tell either
Response.Redire ct or Server.Transfer what frame to display the page in or
that the redirected page isn’t to be displayed in any of the frames?

Thanks for any help.
Chris.
Nov 19 '05 #1
2 2238
Chris,

The source of your problem here is that IFRAMES aren't really a feature of
Server Side ASP.Net Code. Basically, if the result of your server side code
(which i assume is in an iframe) needs to directly affect the iframes of the
parent page, then you need to pass an indication back to the client side,
indicating that you wish to alter the pages displayed in your iframes.

The way i do it is as follows; I run the server side code, and then place a
value in an ASP.Net text box which has a style tag "DISPLAY:No ne" (so that
the end user doesn't see it).

In javascript, Create a client-side window.onload event. In the
window.onload event, I check to see if the textbox contains a value using
code similar to the following:

if(Form1.txtTex tBox.value.leng th > 0){
//redirect banner left to other page
window.parent.f rames(1).locati on.href = "otherpage.aspx ";
//redirect banner right to other page
window.parent.f rames(2).locati on.href = "anotherpage.as px";
}

Basically, you need to give your aspx page some server-side indication of
what it is meant to be doing; eg, Telling it that it needs to redirect other
frames to other pages.

Hope this is of help to you.

m00nm0nkey !!!

"Chris Podmore" wrote:
This is driving me mad so any help will be much appreciated.

I have an html page with 3 frames, banner, left and right. The banner frames
source is an aspx page. The aspx page has two buttons, both need to run some
code and then redirect the user somewhere else. The problem is the redirected
page is being displayed in the banner frame. How do I tell either
Response.Redire ct or Server.Transfer what frame to display the page in or
that the redirected page isn’t to be displayed in any of the frames?

Thanks for any help.
Chris.

Nov 19 '05 #2
Thanks for the reply.
I had a feeling I was going to have to use some java script which I was
hopeing to aviod as I don't know it. I'll give your sample a try.

It feels like MS missed something out to me. I don't know may be its just me.

"m00nm0nkey " wrote:
Chris,

The source of your problem here is that IFRAMES aren't really a feature of
Server Side ASP.Net Code. Basically, if the result of your server side code
(which i assume is in an iframe) needs to directly affect the iframes of the
parent page, then you need to pass an indication back to the client side,
indicating that you wish to alter the pages displayed in your iframes.

The way i do it is as follows; I run the server side code, and then place a
value in an ASP.Net text box which has a style tag "DISPLAY:No ne" (so that
the end user doesn't see it).

In javascript, Create a client-side window.onload event. In the
window.onload event, I check to see if the textbox contains a value using
code similar to the following:

if(Form1.txtTex tBox.value.leng th > 0){
//redirect banner left to other page
window.parent.f rames(1).locati on.href = "otherpage.aspx ";
//redirect banner right to other page
window.parent.f rames(2).locati on.href = "anotherpage.as px";
}

Basically, you need to give your aspx page some server-side indication of
what it is meant to be doing; eg, Telling it that it needs to redirect other
frames to other pages.

Hope this is of help to you.

m00nm0nkey !!!

"Chris Podmore" wrote:
This is driving me mad so any help will be much appreciated.

I have an html page with 3 frames, banner, left and right. The banner frames
source is an aspx page. The aspx page has two buttons, both need to run some
code and then redirect the user somewhere else. The problem is the redirected
page is being displayed in the banner frame. How do I tell either
Response.Redire ct or Server.Transfer what frame to display the page in or
that the redirected page isn’t to be displayed in any of the frames?

Thanks for any help.
Chris.

Nov 19 '05 #3

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

Similar topics

6
4553
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 ="\\209.11.22.33\MyDir" 3. Typing "\\209.11.22.33\MyDir" into my ie6 browser. 4. Typing "\\209.11.22.33\MyDir" into my Windows Explorer. 5. Server-side ASP: server.transfer "\\209.11.22.33\MyDir" 6. Server-side ASP: response.redirect...
3
9071
by: Justin | last post by:
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
5
2745
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 that only scripts get rendered. I have seen this mentioned on this newsgroup before but with no resolution. Can anyone give any insight into this problem. Is there a work around? Manually push the Reponse.OutputStream through your filter after...
4
2103
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 Response.Redirect("URL") or a Server.Transfer("URL"). So I'd like to find out which is more efficient/better. Can anyone please tell me or give any pointers to links on the web? Thanks & Regards
3
2460
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a button inside a-tag with attribute target isn't anything new relating ASP.Net, its same old HTML). He claimed that you could change another page´s controls´s property´s value from another frame by using this method: ' Page "Bottom"
3
5499
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 Silver
42
3860
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
9
4340
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). The browser then makes a new request to the server to redirect itself to abcd.asp after which the user gets redirected to abcd.asp. But in case of Server.Execute (or Server.Transfer), when the server
3
3522
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 flow is 1. Welcome page 2. Login Page (where the SSO actually occurs) 3. Welcome page 4. Default page
0
8394
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.