Frame question

J

Jason Huang

Hi,

In my C# web application, I have a LinkButton lbtnLogout on the Left.aspx.
The whole page is composed of Left, Right, Top, Bottom 4 frames. The Left
frame's function is for menu and login/logout, while the Right frame is the
main page.
How do I need to do so that when I click the lbtnLogout, the Left and Right
frame will go to their original first page Left.aspx and Right.aspx?
Thanks for help.


Jason
 
G

Göran Andersson

Jason said:
Hi,

In my C# web application, I have a LinkButton lbtnLogout on the Left.aspx.
The whole page is composed of Left, Right, Top, Bottom 4 frames. The Left
frame's function is for menu and login/logout, while the Right frame is the
main page.
How do I need to do so that when I click the lbtnLogout, the Left and Right
frame will go to their original first page Left.aspx and Right.aspx?
Thanks for help.


Jason

You need to use client script to do anything at all with the frames. The
server side code has no means to access the separate frames, so you
don't really have any use of a server control. You can use a regular
link with an onclick event:

<a href="Left.aspx"
onclick="window.top.frames['Right'].location.href='Right.aspx';window.location.href=this.href;"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top