Monday, 30 March 2015

ASP.NET - TreeView - How to remove hyperlink

Watch this example on YouTube

Replace
        <asp:TreeView ID="TreeView1" runat="server">
            <Nodes>
                <asp:TreeNode Text ="aaa"></asp:TreeNode>
                <asp:TreeNode Text ="bbb"></asp:TreeNode>
            </Nodes>
        </asp:TreeView>

With
        <asp:TreeView ID="TreeView1" runat="server">
            <Nodes>
                <asp:TreeNode Text ="aaa" SelectAction="None"></asp:TreeNode>
                <asp:TreeNode Text ="bbb" SelectAction="None"></asp:TreeNode>
            </Nodes>
        </asp:TreeView>

No comments:

Post a Comment