PanelBar in Master Page

3 posts, 0 answers
  1. Cameron Arnott
    Cameron Arnott avatar
    18 posts
    Member since:
    Sep 2009

    Posted 29 Oct 2009 Link to this post

    I have a PanelBar in a Master Page, and each PanelItem loads a Page in theĀ ContentPlaceHolder.

    All works fine execpt the entire Page reloads each time a PanelItem is selected.

    Is there any way I can stop this happeneing?


  2. Paul
    Paul avatar
    4281 posts

    Posted 29 Oct 2009 Link to this post

    Hi Cameron,

    Actually, this is expected behavior as this is how masterpage is used. The masterpage is used for building the layout that will be used for multiple ASPX pages. The ContentPlaceHolder is not an iframe, but an editable area for the ASPX pages.

    In order to achieve your goal you can use our RadSplitter control with two panes - in the left pane you can place the panelbar and the new paheges will be loaded in the other pane. Please take a look at this example that shows the needed approach.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Telerik UI for ASP.NET Core is out
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Oct 2009 Link to this post

    Hi Cameron,

    I tried using iframe in ContentPlaceHolder and changing the src based on the PanelBarItem selection from client side which avoids page refresh and loads the requred page in iframe.

    <script type="text/javascript"
        function OnClientItemClicked(sender, args) { 
            var text = args.get_item().get_text(); 
    [Attach OnClientItemClicked to RadPanelBar]

    Default Page:
    <iframe id="iframe1" src="Default3.aspx"></iframe> 

    <script type="text/javascript"
        function changeUrl(text) { 
            var frame = document.getElementById("iframe1"); 
            frame.src = text; 
    Note: Here I am passing the page name to the function as parameter (text), you can change logic according to requirement.

Back to Top