launching asp page in frame in frameset based on toolbar

Discussion in 'ASP .Net Web Controls' started by Steve Myers, Nov 1, 2003.

  1. Steve Myers

    Steve Myers Guest

    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?
     
    Steve Myers, Nov 1, 2003
    #1
    1. Advertising

  2. Steve Myers

    MSFT Guest

    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.)
     
    MSFT, Nov 3, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    673
  2. xzzy
    Replies:
    4
    Views:
    641
  3. Julius Mong
    Replies:
    1
    Views:
    380
    Randy Webb
    May 10, 2004
  4. pcouas
    Replies:
    0
    Views:
    263
    pcouas
    Feb 19, 2007
  5. lev
    Replies:
    1
    Views:
    125
    Thomas 'PointedEars' Lahn
    Sep 10, 2008
Loading...

Share This Page