Re: response.redirect with frames

From: Mark (mfield_at_idonotlikespam.cce.umn.edu)
Date: 03/19/04


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
> >
> >
>
>



Relevant Pages

  • Re: response.redirect with frames
    ... The global error handler must redirect to some page. ... > "Kevin Spencer" wrote in message ... >> Microsoft MVP ... >>> Let's assume a page has a simple top and bottom frame. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: FormsAuthentication.RedirectFromLoginPage is not redirecting to the correct page.
    ... I handle this kind of functionality in a Session variable ... Request.URL.ToStringin the header.ascx control that's placed on all ... procedure, then I redirect to the default page, otherwise I redirect ... there to disregard the login page as a RedirectURL and some other ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: htp "301 Moved Permanently"
    ... Is it possible to redirect a web page using htp? ... Then you can code javascript or other functionality within the html ... that you are "spitting out" via htp.p to have the redirect work ...
    (comp.databases.oracle.server)
  • Re: Domain Registrar Recommendations
    ... the management wants specific functionality in place, ... our current DNS registrar doesn't ... registrar that will allow me to redirect to folders. ...
    (microsoft.public.windows.server.sbs)
  • Re: ListItem doesnt fire event handler when first item is selected
    ... > I have a dropdownlist that I am intending on using as a re-director in an ... I believe the problem to be with the Redirect as which simply outputs to ... I would wrap each select's option around a link with target="name of the ... bottom frame". ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)