Re: response.redirect with frames
From: Mark (mfield_at_idonotlikespam.cce.umn.edu)
Date: 03/19/04
- Next message: Jay Douglas: "Re: set up link to go to spot on the same page"
- Previous message: ruca: "Format"
- In reply to: Kevin Spencer: "Re: response.redirect with frames"
- Next in thread: Kevin Spencer: "Re: response.redirect with frames"
- Reply: Kevin Spencer: "Re: response.redirect with frames"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 12:39:34 -0600
Kevin,
This works beautifully. However, RegisterStartupScript is a method in the
Page class. Is it possible to leverage this type of functionality in the
Global.asax.cs file? I'd love to leverage this in my global error handler
found in the global.asax.cs file. As you know, this file does not inherit
from Page, but I imagine this makes it inherently impossible to do a fancy
redirect from this page. Comments?
Thanks again Kevin. The code will work beautifully everwhere else I need it.
Mark
"Kevin Spencer" <kevin@takempis.com> wrote in message
news:uhvmMmdDEHA.2424@TK2MSFTNGP09.phx.gbl...
> string s = "<script type=\"text/javascript\">parent.frameName.location =
> \"someUrl\";</script>"
> if (!IsStartupScriptRegistered("MyScript"))
> RegisterStartupScript("MyScript", s);
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Mark" <mfield@idonotlikespam.cce.umn.edu> wrote in message
> news:#0dqlSdDEHA.1588@tk2msftngp13.phx.gbl...
> > Frames. Yack, I agree. BUT, I've been mandated to use them.
> >
> > Let's assume a page has a simple top and bottom frame. I have been told
> > that there is NOT a way to use
> Response.Redirect("http://someotherurl.com/")
> > in the bottom frame page to
> > redirect the entire browser window, not just the bottom frame. However,
> > I've been given a suggestion to use javascript and
RegisterStartupScript.
> >
> > Conceptually, how would this work?? Here are my rambling thoughts:
> >
> > 1. In the "bottom page", a postback occurs and it's determined that the
> > entire browser window should be redirected.
> > 2. The "main" page that contains both the top and bottom frame contains
> some
> > function that redirects the entire window to some specified page.
> > 3. The javascript in the bottom page somehow calls the function in the
> > "main" page listed in #2 above.
> >
> > Any suggestions, pseudo code or details would be appreciated. Thanks!
> >
> > Mark
> >
> >
>
>
- Next message: Jay Douglas: "Re: set up link to go to spot on the same page"
- Previous message: ruca: "Format"
- In reply to: Kevin Spencer: "Re: response.redirect with frames"
- Next in thread: Kevin Spencer: "Re: response.redirect with frames"
- Reply: Kevin Spencer: "Re: response.redirect with frames"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|