ie webControls treeview with xml 例子

 .aspx文件中的代码

   <form runat="server">
  <ie:TreeView runat="server">
    <ie:TreeNode runat="server" Text="ASP.NET Books" Expanded="True"
                   TreeNodeSrc="aspnetbooksTV.xml" />                  
  </ie:TreeView>
</form>

XML文件

<?xml version="1.0" encoding="UTF-8" ?>
- <TREENODES>
- <treenode text="Teach Yourself Active Server Pages 3.0 in 21 Days">
  <treenode text="Price - $34.95" />
- <treenode text="Authors">
  <treenode text="Mitchell" />
  <treenode text="Atkinson" />
  </treenode>
  <treenode text="Year Published - 2000" />
  </treenode>
- <treenode text="Designing Active Server Pages">
  <treenode text="Price - $29.95" />
- <treenode text="Authors">
  <treenode text="Mitchell" />
  </treenode>
  <treenode text="Year Published - 2000" />
  </treenode>
- <treenode text="ASP.NET: Tips, Tutorials, and Code">
  <treenode text="Price - $34.95" />
- <treenode text="Authors">
  <treenode text="Mitchell" />
  <treenode text="Mack" />
  <treenode text="Seven" />
  <treenode text="Walther" />
  <treenode text="Anders" />
  <treenode text="Nathan" />
  <treenode text="Wahlin" />
  </treenode>
  <treenode text="Year Published - 2001" />
  </treenode>
- <treenode text="Programming ASP.NET">
  <treenode text="Price - $19.95" />
- <treenode text="Authors">
  <treenode text="Liberty" />
  <treenode text="Hurwitz" />
  </treenode>
  <treenode text="Year Published - 2002" />
  </treenode>
  </TREENODES>
 来自:http://aspnet.4guysfromrolla.com/demos/TreeViewBinding1.aspx
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页