launching asp page in frame in frameset based on toolbar

S

Steve Myers

Ok, learning .net and working with a frameset. The "Top" frame is
basically a toolbar using the microsoft webcontrols. I want to load
the "Bottom" frame based on the button selected on the top frame.

I can retrieve the button info in this vbscript sub:

Private Sub Toolbar1_ButtonClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Toolbar1.ButtonClick


myvar = sender.Text

If myvar = "a" launch page1.asp in "bottom"
If myvar = "b" launch page2.asp in "bottom"

End Sub


What I'm trying to understand is the code to add to do this?
 
M

MSFT

Hi Steve,

To change a frame from another, we need to use some client script, you may
refer to this article as a sample:

HOWTO: Refresh a Specific Frame from Script
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q194227

In your case, you may use following script to change web page in a frame:

window.parent.frames(1).location ="webform2.aspx"

However, since above are client script, you can't execute it in code behind
of a ASP.NET control. I suggest you can add them to client side with
Page.RegisterClientScriptBlock Method. For more information, you may refer
to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemWebUIPageClassRegisterClientScriptBlockTopic.asp

Hope this help,


Luke
Microsoft Online Support

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

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top