Finch
asked on
How do I redirect all Frames within a Frameset in ASP.NET?
I am using ASP.NET (latest version) for the development. I have framesets that consist of several frames such as "Header", "Footer", Left and Right frames. When the user chooses a certain request I want to redirect the user to an entirely different frameset (different URLs). The "Response.Redirect" only works for whichever frame it is executed in. How do I get the other frames to redirect?
For example, if I am in the Footer how can I get the Header to redirect itself?
For example, if I am in the Footer how can I get the Header to redirect itself?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can embed such a script dynamically using the Page.RegisterClientScriptB lock() or Page.RegisterStartUpScript () methods, or by using Response.Write().
ASKER
Could you give an example of how I can do this in C# in a code-behind section?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think the following is close, how do I indicate the script language and how do I put the Path in quotes?
String strTemp = "<script>window.top.locati on=http://localhost/WebApplicationGGH1/GGH_Blocks/TM1/GGH_Welcome_TM1.aspx</Scrip t>";
Page.RegisterClientScriptB lock("Redi rect", strTemp);
String strTemp = "<script>window.top.locati
Page.RegisterClientScriptB
Oops, I made a typo. Use:
<script language="javascript">
not:
<script language="VBScript">
Sorry about that.
<script language="javascript">
not:
<script language="VBScript">
Sorry about that.
Hey Finch,
I'm Marc... 31 years old, about 10 years experience in development of internet applications.
To be honest, I love to combine JavaScript and VB... So in this case, if a certain page is asked for, handle it in the javascript. It's allowed to create JavaScript in VB and put it in the <script language='JavaScript'> part of a HTML-document. So... If you want a frame (or several) redirected, have the page you're about to publisch 'force' a redirection of the other frames. You know, with the document.frames("...").loc ation.href = '...' syntax... You can catch the 'value/id' to be used before it, and have it place in the JavaScript of the page (an Init or something, if you want to control it).
I hope this can be of assistance...
Man, I'm a bit wasted... I was looking for something, but... I can't remember exactly what... I have that quiet often. *grin* Always asking questions which give no answer... Ah well, I'll keep on looking.
Ciao everybody!
Masaia
I'm Marc... 31 years old, about 10 years experience in development of internet applications.
To be honest, I love to combine JavaScript and VB... So in this case, if a certain page is asked for, handle it in the javascript. It's allowed to create JavaScript in VB and put it in the <script language='JavaScript'> part of a HTML-document. So... If you want a frame (or several) redirected, have the page you're about to publisch 'force' a redirection of the other frames. You know, with the document.frames("...").loc
I hope this can be of assistance...
Man, I'm a bit wasted... I was looking for something, but... I can't remember exactly what... I have that quiet often. *grin* Always asking questions which give no answer... Ah well, I'll keep on looking.
Ciao everybody!
Masaia