By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

Frames

P: n/a
I have 3 frames on a web page and using C#

<frame name="left" src="SideMenu.aspx" scrolling="no" noresize style="BACKGROUND-COLOR: #ffffcc">
<frameset rows="16%,84%">
<frame name="rtop" src="TopMenu.aspx">
<frame name="rbottom" src="MainScreen.aspx">
</frameset>
I am trying to display another page in the rbottom frame when I click on the link in the left frame. How do I do that? Does anyone has an example?

Peter
--
Thanks
-------------------
cz****@wsinc.com
Nov 18 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hi Peter,

Thank you for using Microsoft Newsgroup service. Based on your description,
your have a group of web pages arranged in a frameset. The frameset has a
left and a right area and the right area has its own two sub
frames(rtop|rbottom), just like:
-------------------------------------------------------------------------
| | |
| | rtop |
|left |-----------------------------------------------|
| | |
| | |
| | rbottom |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
-------------------------------------------------------------------------
Please correct me if my understanding of your problem is not quite accurate.

If so, here is my suggestion:

To generate a such style framesets, you can code as this in the main
frameset page:

<frameset id="fsleft" cols="20%,80%">
<frame name="left" src="SideMenu.aspx" scrolling="no" noresize
style="BACKGROUND-COLOR: #ffffcc">
<frameset id="fsright" rows="16%,84%">
<frame name="rtop" src="TopMenu.aspx">
<frame name="rbottom" src="MainScreen.aspx">
</frameset>
</frameset>
there are two framesets in it. One is for the left|right outer frameset,
the other is for the top|bottom inner frameset in the right area. And there
are three pages set for the three frames' src. Notice that every frame
should be specified a "name" so that you can use it as the "target" for a
Navigator link. Then, if you want to set a hyperlink in the "left" frame
and let the link's page shown in the "rbottom" frame. You can write the
link as this:

<a href="http://www.asp.net" target="rbottom">ASP.NET</a>
the "target" attribte just specified that in which location will the linked
page shown.
Please try out the preceding suggestion to see whether it helps.
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #2

P: n/a
Thanks for your help, this is what I wanted to do!

But now how do I do the same thing from a server control like a button on
the Web form?

Thank you.

"MSFT" <v-******@online.microsoft.com> wrote in message
news:Aj**************@cpmsftngxa07.phx.gbl...
Hi Peter,

Thank you for using Microsoft Newsgroup service. Based on your description, your have a group of web pages arranged in a frameset. The frameset has a
left and a right area and the right area has its own two sub
frames(rtop|rbottom), just like:
-------------------------------------------------------------------------
| | |
| | rtop |
|left |-----------------------------------------------|
| | |
| | |
| | rbottom |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
-------------------------------------------------------------------------
Please correct me if my understanding of your problem is not quite accurate.
If so, here is my suggestion:

To generate a such style framesets, you can code as this in the main
frameset page:

<frameset id="fsleft" cols="20%,80%">
<frame name="left" src="SideMenu.aspx" scrolling="no" noresize
style="BACKGROUND-COLOR: #ffffcc">
<frameset id="fsright" rows="16%,84%">
<frame name="rtop" src="TopMenu.aspx">
<frame name="rbottom" src="MainScreen.aspx">
</frameset>
</frameset>
there are two framesets in it. One is for the left|right outer frameset,
the other is for the top|bottom inner frameset in the right area. And there are three pages set for the three frames' src. Notice that every frame
should be specified a "name" so that you can use it as the "target" for a
Navigator link. Then, if you want to set a hyperlink in the "left" frame
and let the link's page shown in the "rbottom" frame. You can write the
link as this:

<a href="http://www.asp.net" target="rbottom">ASP.NET</a>
the "target" attribte just specified that in which location will the linked page shown.
Please try out the preceding suggestion to see whether it helps.
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3

P: n/a
you need to use hyperlink object but that renders as plain html < a
href="blah blah blah" target="loadmeup"> with no server side events

Hope this helps,

HD

"Peter" <cz****@wsinc.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Thanks for your help, this is what I wanted to do!

But now how do I do the same thing from a server control like a button on
the Web form?

Thank you.

"MSFT" <v-******@online.microsoft.com> wrote in message
news:Aj**************@cpmsftngxa07.phx.gbl...
Hi Peter,

Thank you for using Microsoft Newsgroup service. Based on your

description,
your have a group of web pages arranged in a frameset. The frameset has a left and a right area and the right area has its own two sub
frames(rtop|rbottom), just like:


-------------------------------------------------------------------------
| | |
| | rtop |
|left |-----------------------------------------------|
| | |
| | |
| | rbottom |
| | |
| | |
| | |
| | |
| | |
| | |
| | |


-------------------------------------------------------------------------
Please correct me if my understanding of your problem is not quite

accurate.

If so, here is my suggestion:

To generate a such style framesets, you can code as this in the main
frameset page:

<frameset id="fsleft" cols="20%,80%">
<frame name="left" src="SideMenu.aspx" scrolling="no" noresize
style="BACKGROUND-COLOR: #ffffcc">
<frameset id="fsright" rows="16%,84%">
<frame name="rtop" src="TopMenu.aspx">
<frame name="rbottom" src="MainScreen.aspx">
</frameset>
</frameset>
there are two framesets in it. One is for the left|right outer frameset,
the other is for the top|bottom inner frameset in the right area. And

there
are three pages set for the three frames' src. Notice that every frame
should be specified a "name" so that you can use it as the "target" for a Navigator link. Then, if you want to set a hyperlink in the "left" frame
and let the link's page shown in the "rbottom" frame. You can write the
link as this:

<a href="http://www.asp.net" target="rbottom">ASP.NET</a>
the "target" attribte just specified that in which location will the

linked
page shown.
Please try out the preceding suggestion to see whether it helps.
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #4

P: n/a
Hi,

Haven't much used ASP.NET controls but couldn't you just set the buttons
onclick event to
change the location property of the rbottom frame using JS.

So in that case you wouldn't even use an ASP.NET button, just a standard
HTML one.

Regards,
Pete
"Peter" <cz****@wsinc.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Thanks for your help, this is what I wanted to do!

But now how do I do the same thing from a server control like a button on
the Web form?

Thank you.

"MSFT" <v-******@online.microsoft.com> wrote in message
news:Aj**************@cpmsftngxa07.phx.gbl...
Hi Peter,

Thank you for using Microsoft Newsgroup service. Based on your

description,
your have a group of web pages arranged in a frameset. The frameset has a left and a right area and the right area has its own two sub
frames(rtop|rbottom), just like:


-------------------------------------------------------------------------
| | |
| | rtop |
|left |-----------------------------------------------|
| | |
| | |
| | rbottom |
| | |
| | |
| | |
| | |
| | |
| | |
| | |


-------------------------------------------------------------------------
Please correct me if my understanding of your problem is not quite

accurate.

If so, here is my suggestion:

To generate a such style framesets, you can code as this in the main
frameset page:

<frameset id="fsleft" cols="20%,80%">
<frame name="left" src="SideMenu.aspx" scrolling="no" noresize
style="BACKGROUND-COLOR: #ffffcc">
<frameset id="fsright" rows="16%,84%">
<frame name="rtop" src="TopMenu.aspx">
<frame name="rbottom" src="MainScreen.aspx">
</frameset>
</frameset>
there are two framesets in it. One is for the left|right outer frameset,
the other is for the top|bottom inner frameset in the right area. And

there
are three pages set for the three frames' src. Notice that every frame
should be specified a "name" so that you can use it as the "target" for a Navigator link. Then, if you want to set a hyperlink in the "left" frame
and let the link's page shown in the "rbottom" frame. You can write the
link as this:

<a href="http://www.asp.net" target="rbottom">ASP.NET</a>
the "target" attribte just specified that in which location will the

linked
page shown.
Please try out the preceding suggestion to see whether it helps.
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #5

P: n/a
Hi Peter,
Thank you for the prompt response. As for the question you mentioned in the
reply, I agree to Peter Row's suggestion , you can just use a html button
like:
<input type="button value="navigator to other place"/>
Thus, you can use client side javascript to specify the operation when the
button is clicked, you needn't write serverside code(the client side code
will be much more quick since the page doesn't need to post back to
server). For example:

In the "SideMenu.aspx" page, you can use a javasciprt function to let a url
opened in a certain frame, and set the html button's "onclick" event as the
function.

<html>
<head>
.....
<script language="javascript">
function JumpTo( url, tar)
{
window.parent.rbottom.location.href = url
}
</script>
.....
</head>
<body>
.......

<input type="button" value="jump to other place"
onclick="JumpTo('http://www.asp.net')" />
...........
</body>
</html>

the "window.parent.rbottom.location.href = url" is used to set the page(in
the rbottom frame)'s url location. In a set of frames which have the same
parent frame can find each other via "window.parent.framename". As the
same, you can use "window.parent.left" to find the "left" frame in the
"rbottom" frame's page's client javascript code.
Please try out the suggestion to see whether it helps. Also if you have any
questions on it, please feel free to let me know.
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #6

P: n/a
Hi Peter,

Have you had a chance to try out my suggestion or is your problem resolved?
If you have any questions please feel free
to let me know.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #7

P: n/a
Thank you for your suggestion - it works very nice!

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:LS**************@cpmsftngxa07.phx.gbl...
Hi Peter,

Have you had a chance to try out my suggestion or is your problem resolved? If you have any questions please feel free
to let me know.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.