AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=584&pId=-1
CodeSnip:ASPNETMenu
page
by Web Team at ORCS Web
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 10054/ 20

ASP.NET Menu is a really powerful drop-down menu generator for the ASP.NET programmer. All JavaScript and client-side programming is done automatically with minimal ASP.NET programming.

From their website, http://www.aspnetmenu.com/ you can view many samples that will impress even the most skeptical, and there is even a menu generator where you can use an online tool that will help you generate the drop-down menu to your liking.

It is important to remember that this ultimately generates Client-Side JavaScript so some of the older browsers will not handle this correctly. Be sure to test how it will respond for all your potential clients. Generally, though, this will work on all the modern browsers.

Example Menu

To create a basic horizontal drop-down menu with some style sheet formatting, simply do the following:

  • Put the ASPNETMenu.DLL file in your /bin folder.
  • Add the following to the top of your .aspx page.

<%@ Register TagPrefix="MENU" Namespace="ASPNETMenu"
Assembly="ASPNETMenu" %>

Add this to the body where you want the menu:

<MENU:ASPNETMENU id="ASPNETMenu1" runat="server" IsMovable="True"
MenuData="menudata.xml"></MENU:ASPNETMENU> 

Create an .xml file in the same folder as your .aspx file that is similar
to this and name it menudata.xml:

<MenuData>     
<MenuGroup>
<MenuItem Label="Main">
<MenuGroup ExpandOffsetY="1" ExpandOffsetX="-1">
<MenuItem Label="Sign-up" ID="i_Signup" URL="http://www.orcsweb.com/signup.asp"/>
<MenuItem Label="Hosting Plans-->">
<MenuGroup>
<MenuItem Label="Clustered" ID="i_Clustered" 
URL="http://www.orcsweb.com/clusters.asp"/>
<MenuItem Label="Dedicated" ID="i_Dedicated" 
URL="http://www.orcsweb.com/dedicatedinfo.asp"/>
<MenuItem Label="Shared" ID="i_Shared" URL="http://www.orcsweb.com/shared.asp"/>
</MenuGroup>
</MenuItem>
</MenuGroup>
</MenuItem>
<MenuItem Label="Support">
<MenuGroup ExpandOffsetY="1" ExpandOffsetX="-1">
<MenuItem Label="About Us" ID="i_AboutUs" URL="http://www.orcsweb.com/whoare.asp"/>
<MenuItem Label="Articles" ID="i_Articles" URL="http://www.orcsweb.com/articles.asp"/>
<MenuItem Label="Supportt" ID="i_Support" URL="http://www.orcsweb.com/support1.asp" />
<MenuItem Label="Who are we" ID="i_whoarewe" URL="http://www.orcsweb.com/whoare.asp" />
</MenuGroup>
</MenuItem>
</MenuGroup> 
</MenuData>

That's it. As already mentioned though, this is just the beginning. Visit the tutorial or samples at http://www.aspnetmenu.com/.

By Scott Forsyth, a senior web specialist at ORCS Web, Inc. - a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.


Product Spotlight
Product Spotlight 

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 11:16:43 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search