Switch the page into design mode and
drag and drop the ExpertTree icon from Visual Studio Toolbox onto the page.
If you don't use Visual Studio or can't find the ExpertTree icon on the Toolbox,
follow three easy steps:
1. Make ExpertControls assembly available for your web application.
To do this, copy
ASPNETExpert.WebControls.dll assembly to the
bin directory
of your web application.
If you use Visual Studio, add reference to
ASPNETExpert.WebControls.dll to
the application
References.
2. Put the following statement at the top of the aspx page:
<%@ Register TagPrefix="ec"
Namespace="ASPNETExpert.WebControls"
Assembly ="ASPNETExpert.WebControls" %>
3. Place tree control where you want it in your page:
<ec:ExpertTree runat="server" id="ExpertTree1" />
Important notion. If you use ASP.NET 1.1, add the following statement to
the
<system.web> section of the application's Web.config file:
<httpHandlers>
<add verb="*" path="ExpertControlsWebResource.axd"
type="ASPNETExpert.WebControls.HttpHandler.WebResourceHandler,ASPNETExpert.WebControls"/>
</httpHandlers>
Create tree structure.
If you run VisualStudio, you can use
ExpertTree Designer.
Otherwise, manually create tree structure.
<ec:ExpertTree id="ExpertTree1" runat="server" Skin="Classic">
<Nodes>
<ec:TreeNode Text="North America" Expanded="True">
<Nodes>
<ec:TreeNode Text="USA" />
<ec:TreeNode Text="Canada" />
</Nodes>
</ec:TreeNode>
</Nodes>
</ec:ExpertTree>
Here is the result:
To ease manual editing in Visual Studio, add
Expert Controls schema:
<body xmlns:ec="urn:http://aspnetexpert.com/ExpertControls.xsd">