Frames & Redirection
-
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!
-
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!
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-----