数据库表结构
aspx页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MainMenu.aspx.cs" Inherits="MainMenu" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!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>
<link rel=Stylesheet type="text/css" href="Client/Css/icons.css" />
</head>
<script type="text/javascript">
function MenuItemClick(menuItem) {
CenterPanel.body.update(String.format("Clicked: {0}", menuItem.text)).highlight();
}
function TreeItemClick(node,e) {
CenterPanel.body.update(String.format("Clicked: {0}", node.text)).highlight();
}
</script>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<ext:ViewPort ID="ViewPort1" runat="server">
<Body>
<ext:BorderLayout runat="server">
<West Split="true">
<ext:Panel runat="server" Border="false" Width="160">
<LoadMask Msg="正在加载" ShowMask=true />
<Body>
<ext:Accordion ID="Accordion1" runat="server">
</ext:Accordion>
</Body>
</ext:Panel>
</West>
<Center>
<ext:Panel ID="CenterPanel" runat="server" Title="" BodyStyle="padding:20px;" >
<LoadMask Msg="正在加载" ShowMask=true />
</ext:Panel>
</Center>
<East>
<ext:Panel ID="Panel1" runat="server" Border="false" Width="160">
<LoadMask Msg="正在加载" ShowMask=true />
<Body>
<ext:Accordion ID="Accordion2" runat="server">
</ext:Accordion>
</Body>
</ext:Panel>
</East>
</ext:BorderLayout>
</Body>
</ext:ViewPort>
</div>
</form>
</body>
</html>
cs 代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Coolite.Ext.Web;
public partial class MainMenu : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!Ext.IsAjaxRequest)
{
new RightPanelMenu().LoadMainMenuPanel(Accordion1, "0000");
new RightTreePanel().LoadMainTreePanel(Accordion2, "0000");
}
}
}
}