<html>
<head>
<title>Binding a TreeView Control to a SiteMapDataSource</title>
<link rel="stylesheet" href="/shared/netdemos.css">
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Binding a <span class="hilite">TreeView</span> Control to a <span class="hilite">SiteMapDataSource</span></h2></div>
<!-- #include virtual="~/shared/viewsrc_top.inc" -->
<hr size=1 width=92%>
<form runat="server">
<p align="center">This example shows a <b>TreeView</b> bound to a <i>SiteMapDataSource</i> control. </p>
<div style="margin-left:50"
<asp:treeview id="myTreeView" runat="server"
datasourceid="siteMap"
imageset="XPFileExplorer"
showlines expanddepth=1 target="_ext">
<levelstyles>
<asp:treenodestyle font-bold
verticalpadding=3 />
<asp:treenodestyle
verticalpadding=5 />
</levelstyles>
</asp:treeview>
</div>
<asp:sitemapdatasource id="siteMap" runat="server" />
</form>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>