RE: Frame for Response.Driect or Server.Transfer

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris Podmore (ChrisPodmore_at_discussions.microsoft.com)
Date: 01/05/05


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.



Relevant Pages

  • RE: Frame for Response.Driect or Server.Transfer
    ... Server Side ASP.Net Code. ... needs to directly affect the iframes of the ... > I have an html page with 3 frames, banner, left and right. ... > code and then redirect the user somewhere else. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Preserving DOM context between pages when drilling down
    ... frame that gives all frames access to a socket so as to retrieve information ... just got back from the server, so would it make more sense to ask the ... browser to display the background html page and then use the ...
    (comp.lang.javascript)
  • Re: Handling requests that have a long response time
    ... > and display the results. ... > a) Redirect to a new "Please wait" page till the processing is done, ... > b) Display a "Please wait" message on the same page that sends the request ... > to the server and refresh the page to display the results. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: name server or domain name
    ... > from a popular seach engine site, but the downfall is that unless I display ... I have to show the redirect IP address. ... > points to my server IP and it is now displayed while users are surfing my ...
    (comp.sys.sun.admin)
  • Handling requests that have a long response time
    ... I have a request to the server that could take upto 10 mins to come back ... and display the results. ... Redirect to a new "Please wait" page till the processing is done, ...
    (microsoft.public.dotnet.framework.aspnet)