萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> asp.net編程 >> EasyUI Tree+Asp.net實現權限樹或目錄樹導航的簡單實例

EasyUI Tree+Asp.net實現權限樹或目錄樹導航的簡單實例

 本篇文章主要是對EasyUI Tree+Asp.net實現權限樹或目錄樹導航的簡單實例進行了介紹,需要的朋友可以過來參考下,希望對大家有所幫助

 代碼如下: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Manage_Main" %>   <!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>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />     <title>網站後台通用管理系統,<%=adminname%>,您好!</title>     <link href="Css/default.css" rel="stylesheet" type="text/css" />     <!--easyui-->     <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css" />     <link rel="stylesheet" type="text/css" href="easyui/themes/default/tree.css" />     <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" />     <script type="text/javascript" src="easyui/jquery-1.8.0.min.js"></script>     <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>     <script type="text/javascript" src='EasyUI/JQLoader.js'> </script>     <script type="text/javascript" src='EasyUI/outlook.js'> </script>     <script type="text/javascript">         $(function () {             $('#lefttree').tree({                 animate: true,                 checkbox: false,                 url: 'GetTreeDataFromDB.ashx?father=0',                 onClick: function (node) {                     if (node.attributes != "") {                         addTab(node.text, node.attributes, node.id);                     }                 },                 onLoadSuccess: function (node, data) {                     $('#lefttree').show();                 }             });               $('#loginOut').click(function () {                 $.messager.confirm('系統提示', '您確定要退出本次登錄嗎?', function (r) {                     if (r) {                         location.href = 'LoginExit.ashx';                     }                 });             })         });     </script>     </head>     <body class="easyui-layout" style="overflow-y: hidden"  scroll="no">     <form id="form1" runat="server">       <noscript>       <div style=" position:absolute; z-index:100000; height:2046px;top:0px;left:0px; width:100%; background:white; text-align:center;"> <img src="images/noscript.gif" alt='抱歉,請開啟腳本支持!' /> </div>       </noscript>       <div region="north" split="true" border="false" style="overflow: hidden; height: 60px;         background: url(images/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%;         line-height: 20px;color: #fff; font-family: Verdana, 微軟雅黑,黑體">         <div style="float:right;padding-top:5px;padding-right:20px;text-align:right;"> <span class="head">       </span>           <div style=" margin-top:6px;" class="head"> <span class="icon icon-quit"> </span><a href="#" id="loginOut">安全退出</a> </div>         </div>         <span style="padding-left:10px; font-size: 16px; "><img src="images/blocks.gif" width="20" height="20" align="absmiddle" />網站後台通用管理系統 V1.0</span> </div>       <div region="south" split="true" style="height: 30px; background: #D2E0F2; ">         <div class="footer"> 網站後台通用管理系統 <%=adminname%>,您好! 版權所有@2012</div>       </div>       <div region="west" hide="true" split="true" title="導航菜單" style="width:180px;" id="west">         <div id="nav" class="easyui-accordion" fit="true" border="false">            <!--  導航內容 -->           <div id="lefttree" style="margin:5px;"></div>         </div>       </div>       <div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden">         <div id="tabs" class="easyui-tabs"  fit="true" border="false" >           <div title="歡迎使用" style="padding:20px;overflow:hidden; " > <span style="font-size:18px;">歡迎進入系統</span> </div>         </div>       </div>       <div id="mm" class="easyui-menu" style="width:150px;">         <div id="mm-tabupdate">刷新</div>         <div class="menu-sep"></div>         <div id="mm-tabclose">關閉</div>         <div id="mm-tabcloseall">全部關閉</div>         <div id="mm-tabcloseother">除此之外全部關閉</div>         <div class="menu-sep"></div>         <div id="mm-tabcloseright">當前頁右側全部關閉</div>         <div id="mm-tabcloseleft">當前頁左側全部關閉</div>         <div class="menu-sep"></div>         <div id="mm-exit">退出</div>       </div>     </form> </body> </html>     復制代碼 代碼如下: <%@ WebHandler Language="C#" Class="GetTreeDataFromDB" %>   using System; using System.Web; using System.Configurati
copyright © 萬盛學電腦網 all rights reserved