Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Splitter / Opening link in RadSplitter pane when using master pages

Opening link in RadSplitter pane when using master pages

Article Info

Rating: Not rated

  • Article information

    Article relates to

     RadSplitter v.1.x

    Created by

     Tsvetelina, Telerik

    Last modified

     April 14, 2008

    Last modified by

     Svetlina, Telerik



  • HOW-TO

    Open link in RadSplitter pane when using master pages.





    DESCRIPTION

    It is a common scenario to use the RadSplitter control to manage the layout of a page when creating web applications. Let us assume that you have placed a RadTreeView in one RadPane and that you want the links you have specified in the NavigateUrl property of each node to open in another RadPane.
    Let us also assume that the page containing thet RadSplitter has a Master Page specified. This KB article will demonstrate how you can open links in RadSplitter pane when using master pages.

    SOLUTION

    To see this in action, you can download the project at the end of this article.

    Let us assume that you have placed the RadTreeView in RadPane1 and that you want to open the links in RadPane2.
    In order to achieve the desired result, you have to make sure that:
    1. You set the Target attribute of every RadTreeNode to point to the ClientID of RadPane2 in the code-behind:

              foreach (RadTreeNode node in this.RadTreeView1.Nodes)  
              {  
                  node.Target = this.RadPane2.ClientID;  
              } 
    2. You have also initially set the ContentUrl property of RadPane2 to an external page. In case you do not want to have an initially loaded page in it, you can just set it to "about:blank":

              <radspl:RadPane ID="RadPane2" ContentUrl="about:blank" runat="server">  
              </radspl:RadPane> 

    For a code example that demonstrates this functionality, please download the attached zip archive and extract the files.




    Since this article concerns that the MasterPage is an INamingContainer and when using it ClientIDs should be used, it is not related to the RadSplitter control's specifics. This being said, the same approach works when using RadSplitter for ASP.NET AJAX.  

    Comments

    There are no comments yet.
    If you'd like to comment on this KB article, please, send us a Support Ticket.
    Thank you!

    Please Sign In to rate this article.