Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Frames & Redirection

Frames & Redirection

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mike L
    wrote on last edited by
    #1

    My project framework currently uses an HTML frame page (once the user logs in). The frame is fairly simple in concept (banner at top, then a contents column, and a main area, both below the banner/menu). A click in the banner/menu area should change the form in the main and contents frames. I can create an event which issues a Redirect to both the contents and main windows (they almost always need to change at the same time), but the Response.Redirect won't work in that context - I get a .NET error saying so (I assume because the event receiver is in the form which then is redirected...) I can't simply use a BASE, TARGET tag in html, since both sub-windows(contents and main) need to be redrected by a single click. Can someone suggest another means of page redirection that will work with frames and events? What I basically require is a menu area at top, and two indepently scrollable (horiz and vertical) areas below (they don't need to be resizable, but that would be a nice plus). Thanks very much for your help!

    B 1 Reply Last reply
    0
    • M Mike L

      My project framework currently uses an HTML frame page (once the user logs in). The frame is fairly simple in concept (banner at top, then a contents column, and a main area, both below the banner/menu). A click in the banner/menu area should change the form in the main and contents frames. I can create an event which issues a Redirect to both the contents and main windows (they almost always need to change at the same time), but the Response.Redirect won't work in that context - I get a .NET error saying so (I assume because the event receiver is in the form which then is redirected...) I can't simply use a BASE, TARGET tag in html, since both sub-windows(contents and main) need to be redrected by a single click. Can someone suggest another means of page redirection that will work with frames and events? What I basically require is a menu area at top, and two indepently scrollable (horiz and vertical) areas below (they don't need to be resizable, but that would be a nice plus). Thanks very much for your help!

      B Offline
      B Offline
      Bill Priess
      wrote on last edited by
      #2

      Ahhh... the joys of working with frames and postback events. Ok, here is your solutions: 1. Get rid of the frames! j/k ;) 2. use client-side javascript: function Change(url1, url2) { top.frames['Contents'].location.href = url1; top.frames['Main'].location.href = url2; } Then, in your events in the code-behind: Page.RegisterStartUpScript("change","Change('http://localhost/contents.aspx','http://localhost/main.aspx');"); 3. Create your links and controls dynamically in the code-behind, and then inject them into your pages with the appropiate attributes (OnClick, TARGET). HTH, Bill P. Oakland, CA


      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCM/MU/B dpu s--:-- a32 C++++$ ULH+++ P+++ L++ E+ W+++$ N++ o K? w++++$ O-- M V-- PS+ PE+ Y++ PGP++ t++@ 5++@ X++ R+@ tv b++ DI++ D+++>++++ G++ e++ h---- r+++ y++++ -----END GEEK CODE BLOCK-----


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups