RE: Frame for Response.Driect or Server.Transfer
From: Chris Podmore (ChrisPodmore_at_discussions.microsoft.com)
Date: 01/05/05
- Next message: Jason: "Use variable within HTML with ASP.NET"
- Previous message: m00nm0nkey: "RE: Frame for Response.Driect or Server.Transfer"
- In reply to: m00nm0nkey: "RE: Frame for Response.Driect or Server.Transfer"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 5 Jan 2005 08:43:05 -0800
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:None" (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.txtTextBox.value.length > 0){
> //redirect banner left to other page
> window.parent.frames(1).location.href = "otherpage.aspx";
> //redirect banner right to other page
> window.parent.frames(2).location.href = "anotherpage.aspx";
> }
>
> 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.Redirect 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.
- Next message: Jason: "Use variable within HTML with ASP.NET"
- Previous message: m00nm0nkey: "RE: Frame for Response.Driect or Server.Transfer"
- In reply to: m00nm0nkey: "RE: Frame for Response.Driect or Server.Transfer"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|