Treeview node target

Discussion in 'ASP .Net Web Controls' started by Madison, May 11, 2007.

  1. Madison

    Madison Guest

    Hello;

    I'm working with treeveiw control for framework 2.0, the treeview have
    parent, child and grandchild. if user click on grandchild, I want to display
    informtion in the right frame in the same page as treeview familar to this
    MSDN newsgroups. How do I handle this event? I try to use frame in page and
    set target to that frame but the page open in the whole page.

    Thanks.
     
    Madison, May 11, 2007
    #1
    1. Advertising

  2. Hi Madison,

    As for the displaying linked url(navigation page) in a specified
    frame(within a frameset container page), you can use the following approach:

    1. First , in your frameset page, you need to give a fixed name to each
    frame(especially the one you want to display linked url/page in) e.g.

    ====frameset page==========
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html >
    <frameset cols = "200,*">
    <frame src ="nav.aspx" name="nav"/>
    <frame src ="content.aspx" name="content"/>

    </frameset>

    </html>

    ==================

    2. In your navigation page(that contain the treeview or menu), set the
    "Target" attribute(of treeview node) to the frame name of the target frame
    window you want to display page in. e.g.

    =====in nav.aspx=============
    <body style=" margin-left:0; margin-right:0; margin-top:0;
    margin-bottom:0">
    <form id="form1" runat="server">
    <div style="vertical-align:top">
    <asp:TreeView ID="TreeView1" runat="server">
    <Nodes>
    <asp:TreeNode Text="New Node" Value="New Node">
    <asp:TreeNode Text="New Node" Value="New Node">
    <asp:TreeNode Text="ASP.NET Site" Value="ASP.NET
    Site"
    NavigateUrl="http://www.asp.net" Target="content"
    ></asp:TreeNode>

    </asp:TreeNode>
    </asp:TreeNode>
    <asp:TreeNode Text="New Node" Value="New Node">
    <asp:TreeNode Text="New Node" Value="New Node">
    <asp:TreeNode Text="The ServerSide Site" Value="The
    ServerSide Site"
    NavigateUrl="http://www.theserverside.net"
    Target="content" ></asp:TreeNode>
    </asp:TreeNode>
    </asp:TreeNode>
    <asp:TreeNode Text="New Node" Value="New Node">
    <asp:TreeNode Text="New Node" Value="New Node">
    <asp:TreeNode Text="New Node" Value="New
    Node"></asp:TreeNode>
    </asp:TreeNode>
    </asp:TreeNode>
    </Nodes>
    </asp:TreeView>

    </div>
    </form>
    </body>
    </html>
    ================================

    http://www.w3schools.com/tags/tag_frame.asp

    Hope this helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================



    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], May 14, 2007
    #2
    1. Advertising

  3. Hi Madison,

    Have you got any progress or further idea on this issue or does the
    suggestion in my last reply help you some? If there is anything else we can
    help, please feel free to post here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], May 17, 2007
    #3
    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. wolf
    Replies:
    0
    Views:
    564
  2. Replies:
    0
    Views:
    1,568
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,458
    Dimitre Novatchev
    Aug 24, 2006
  4. jiing
    Replies:
    0
    Views:
    2,356
    jiing
    Apr 27, 2007
  5. mohit
    Replies:
    0
    Views:
    580
    mohit
    Jan 23, 2008
Loading...

Share This Page