ASP.NET 2.0写无限级下拉菜单


复制代码 代码如下:
<%@ Page Language="C#" %>
<html>
<!-- ASP.NET 2.0的例子 -->
<head runat="server">
</head>
<body>
<form runat="server">
<h3>下拉菜单的例子</h3>
<!-- Use declarative syntax to create the -->
<!-- menu structure. Submenu items are -->
<!-- created by nesting them in parent menu -->
<!-- items. -->
<ASP:menu id="NavigationMenu"
disappearafter="2000"
staticdisplaylevels="2"
staticsubmenuindent="10"
orientation="Horizontal"
font-names="Arial"
target="_blank"
runat="server">
<staticmenuitemstyle backcolor="#DDDDDD"
forecolor="red"/>
<statichoverstyle backcolor="#DDDDDD"/>
<dynamicmenuitemstyle backcolor="#EEEEEE"
forecolor="red"/>
<dynamichoverstyle backcolor="#DDDDDD"
forecolor="Black"/>
<items>
<ASP:menuitem navigateurl="http://dotNET.ASPx.cc/"
text="首页"
tooltip="首页">
<ASP:menuitem navigateurl="http://dotNET.ASPx.cc/ShowList.ASPx?id=1"
text="ASP.NET 栏目"
tooltip="ASP.NET 栏目">
<ASP:menuitem navigateurl="Classical.ASPx"
text="ASP.NET 最新文章"
tooltip="ASP.NET 最新文章"/>
<ASP:menuitem navigateurl="Rock.ASPx"
text="ASP.NET 问与答"
tooltip="ASP.NET 问与答">
<ASP:menuitem navigateurl="Classical.ASPx"
text="ASP.NET 最新文章"
tooltip="ASP.NET 最新文章"/>
<ASP:menuitem navigateurl="Classical.ASPx"
text="ASP.NET 最新文章"
tooltip="ASP.NET 最新文章"/>
</ASP:menuitem>
<ASP:menuitem navigateurl="Jazz.ASPx"
text="Jazz"
tooltip="Jazz"/>
</ASP:menuitem>
<ASP:menuitem navigateurl="Movies.ASPx"
text="Movies"
tooltip="Movies">
<ASP:menuitem navigateurl="Action.ASPx"
text="Action"
tooltip="Action">
<ASP:menuitem navigateurl="Drama.ASPx"
text="Drama"
tooltip="Drama"/>
</ASP:menuitem>
<ASP:menuitem navigateurl="Drama.ASPx"
text="Drama"
tooltip="Drama"/>
<ASP:menuitem navigateurl="Musical.ASPx"
text="Musical"
tooltip="Musical"/>
</ASP:menuitem>
</ASP:menuitem>
</items>
</ASP:menu>
</form>
</body>
</html>

AspNet技术ASP.NET 2.0写无限级下拉菜单,转载需保留来源!

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。