成功修改梅花雪MzTreeView为asp.net版本,共享给大家!
相信很多使用过梅花雪的程序员都觉得这个树的效率相当高,相当快。可惜的还没有人发布过asp.net版本的。通过半天的努力,我终于实现了,现将我写的程序公布出来,让大家参考一下。
前台页面:
<%@ Page Language= "C# " AutoEventWireup= "true " CodeBehind= "Default.aspx.cs " Inherits= "Tree._Default " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml " >
<head runat= "server ">
<title> 目录树 </title>
<script type= "text/javascript " language= "javascript " src= "MzTreeView10.js "> </script>
<link href= "css/Global.css " type= "text/css " rel= "stylesheet "/>
<style type= "text/css ">
A.MzTreeview
{
font-size: 9pt;
padding-left: 3px;
}
</style>
</head>
<body>
<form id= "form1 " runat= "server ">
<script type= "text/javascript " language= "javascript ">
<!--
window.tree = new MzTreeView( "tree ");
tree.icons[ "property "] = "property.gif ";
tree.icons[ "css "] = "collection.gif ";
tree.icons[ "book "] = "book.gif ";
tree.iconsExpand[ "book "] = "bookopen.gif ";
tree.setIconPath( "/images/ ");
<% LoadTree(); %>
tree.focus(4945);
tree.setURL( "# ");
tree.setTarget( " ");
document.write(tree.toString());
-->
</script>
</form>
</body>
</html>
后台页面:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.We