根据模板文件建立动态目录树结构的类:建议入精华备查,有演示<br>
演示地址:http://www.cnaspol.com/myasp/mmtree/treesample.asp<br>
本程序包括三文件和相关的图片文件,包括test.asp,tree.asp,mytree.txt组成<br>
test.asp 引用类文件和模板文件<br>
<%@ Language=VBScript %><br>
<!-- #include file="tree.asp" --><br>
<%<br>
'========================================<br>
'BUILDING A TREE FROM A TEMPLATE FILE<br>
'========================================<br>
<br>
Set MyTree1 = New Tree<br>
MyTree1.Top = 10<br>
MyTree1.Left = 10<br>
MyTree1.ExpandImage = "plus.gif"<br>
MyTree1.CollapseImage = "minus.gif"<br>
MyTree1.LeafImage = "webpage.gif"<br>
<br>
MyTree1.LoadTemplate Server.MapPath("mytree.txt")<br>
<br>
MyTree1.Draw()<br>
<br>
Set MyTree1 = Nothing<br>
<br>
%><br>
<br>
</BODY><br>
</HTML><br>
<br>
<br>
mytree.txt 树形结构模板文件<br>
<br>
Cisco<br>
Cisco Links #1<br>
<A HREF="#">Adjusting IP MTU, TCP MSS, and PMTUD on Windows and Sun Systems (by Cisco)</A><br>
<A HREF="#">Cisco Command Documentation</A><br>
<A HREF="#">Cisco's Collection</A><br>
Cisco Links #2<br>
<A HREF="#">DFW Cisco Users Group</A><br>
<A HREF="#">Internet Protocol Journal (by Cisco)</A><br>
asp #2<br>
asp #2<br>
<A HREF="#">vb</A><br>
<A HREF="#">asp</A><br>
Desktop<br>
Cisco Links #3<br>
<A HREF="#">Area Code Lookup</A><br>
<A HREF="#">Arin Based Whois Search</A><br>
<A HREF="#">World Time Zone Map</A><br>
Cisco Links #4<br>
<A HREF="#">Area Code Lookup</A><br>
<A HREF="#">Arin Based Whois Search</A><br>
<A HREF="#">World Time Zone Map</A><br>
<A HREF="#">World Time Zone Map</A><br>
Internet<br>