这部分页面基本没啥代码,我把我设计页的源码分享出来。
这里用的是frameset上古框架,在大学可以用,外面似乎用iframe+div的比较多。
页面分三个部分,篇幅最大的一块用来显示内容,顶部是top.aspx,左边的侧边栏是菜单menu.aspx
1.main
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="main.aspx.cs" Inherits="admin_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 runat="server">
<title>BQ购物网后台管理</title>
</head>
<frameset rows="100,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="top.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
<frameset cols="200,*" frameborder="no" border="0" framespacing="0">
<frame src="menu.aspx" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" />
<frame src="" name="College" id="mainFrame" />
</frameset>
</frameset>
<noframes>
</noframes>
</html>
2.top
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="top.aspx.cs" Inherits="admin_top" %>
<!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>BQ购物网后台</title>
<link href="css/web.css" rel="stylesheet" type="text/css" />
</head>
<body style="background:#dbe7a1;">
<form id="form1" runat="server">
<div>
<table width="100%" height="100" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><img src="images/logo.jpg" width="500" height="100" /></td>
<td align="right" style="padding:0 50px 0 0; color:#FFFFFF;">欢迎 <asp:Label
ID="username" runat="server" Text="Label"></asp:Label>
登录 | <a href="../user/index.aspx" target="_blank" style="color:#FFFFFF;">返回首页</a> | <a href="exit.aspx" style="color:#FFFFFF;">退出</a></td>
</tr>
</table>
</div>
</form>
</body>
</html>
3.menu
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="menu.aspx.cs" Inherits="admin_menu" %>
<!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 id="Head1" runat="server">
<title>BQ购物网后台管理</title>
<link href="css/web.css" rel="stylesheet" type="text/css" />
</head>
<body style="background:#dbe7a1;">
<form id="form1" runat="server">
<%
BQ.Entity.admin admin = new BQ.Entity.admin();
admin = (BQ.Entity.admin)BQ.SessionHelper.GetSession("admin");
%>
<% if (admin.State == 8) //管理员拥有的权限
{%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="28" align="center"><a href="user.aspx" target="College" style="color:#FFFFFF;">会员管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="Mall.aspx" target="College" style="color:#FFFFFF;">商家管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="menulist.aspx" target="College" style="color:#FFFFFF;">分类管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="menulist_add.aspx" target="College" style="color:#FFFFFF;">新增分类</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="goods.aspx" target="College" style="color:#FFFFFF;">商品管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="order.aspx" target="College" style="color:#FFFFFF;">订单管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="message.aspx" target="College" style="color:#FFFFFF;">评论管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="password.aspx" target="College" style="color:#FFFFFF;">密码设置</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="exit.aspx" target="College" style="color:#FFFFFF;">退出系统</a></td>
</tr>
</table>
<%}
else //商家拥有的权限
{ %>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="28" align="center"><a href="goods.aspx" target="College" style="color:#FFFFFF;">商品管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="goods_add.aspx" target="College" style="color:#FFFFFF;">新增商品</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="order.aspx" target="College" style="color:#FFFFFF;">订单管理</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="admin_edit.aspx" target="College" style="color:#FFFFFF;">商家信息</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="password.aspx" target="College" style="color:#FFFFFF;">密码设置</a></td>
</tr>
<tr>
<td height="28" align="center"><a href="exit.aspx" target="College" style="color:#FFFFFF;">退出系统</a></td>
</tr>
</table>
<%} %>
</form>
</body>
</html>
基本没啥难度,都是用a href进行的页面跳转