开发者

Master page managing ContentPlaceHolder

开发者 https://www.devze.com 2022-12-22 21:44 出处:网络
I have a master page in C#, where I have this code: <div style=\"width: 30%;height: 500px;float:left\">

I have a master page in C#, where I have this code:

<div style="width: 30%;height: 500px;float:left">
        <asp:ContentPlaceHolder ID="cphMenu" runat="server">
        </asp:ContentPlaceHolder> 
    </div>


    <div style="width: 65%;height: 500px; float:right">
       <asp:ContentPlaceHolder ID="cphMain" runat="server">            
       </asp:ContentPlaceHolder>        
    </div>

As you can see, I have two ContentPlaceHolders, the first one is the left menu (cphMenu), and the second one is the page itself. So开发者_JS百科, I want to click an item from the menu (the menu is a treeview) and load that specific page on the second contentplaceholder (cphMain).

How can I get that behaviour??

Thanks in advance.


create content pages for each 'specific page', make them use your master page, place correct content into the cphMain

then in treeView add URLs for these pages.

Master page is like a template for content pages, so it will fill the content from content page into placeholders.

0

精彩评论

暂无评论...
验证码 换一张
取 消