簡體   English   中英

我如何在asp.net中制作固定樹視圖

[英]how can i make fixed tree view in asp.net

我在asp網站上有treeview時,單擊鏈接的節點會將整個頁面重定向到treeview,而不會保留到該頁面。 但是我只想更改主頁,樹狀視圖必須像Windows資源管理器一樣保留在所有頁面中。 我正在使用asp.net網站,請幫助我該怎么做?

這是我的treevew。

Home
  page1
  page2
page3
  page4

創建一個在表中具有樹視圖的母版頁,如下所示

 <table border="0" cellspacing="0" cellpadding="0" id="content-container" style="width:     1016px; height: 407px;">
      <tbody>
        <tr>
             <td id="content-left" style="width: 200px; height: 424px; border-top-style:      solid; border-right-style: solid; border-left-style: solid; border-bottom-style: solid;   border-bottom-color: buttonface; border-top-color: buttonface; border-right-color: buttonface; border-left-color: buttonface;">
                <!-- 

   LEFT COLUMN

-->
                <br />
                <asp:Panel ID="Panel1" runat="server" Height="455px" Width="220px">
                    <asp:TreeView ID="tvNodes" runat="server" Height="448px" Width="215px" ShowLines="True">
                    </asp:TreeView>
                </asp:Panel>

            </td>
            <td id="content" style="width: 736px; height: 424px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-bottom-color: buttonface; border-top-color: buttonface; border-right-color: buttonface; ">
                 <asp:contentplaceholder id="ContentPlaceHolder1" runat="server" >
    </asp:contentplaceholder>
            </td>

        </tr>
    </tbody>
</table>  

並將頁面加載到節點單擊事件上的ContentPlaceHolder1上。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM