Adding Dynamic Menus with ASP.NET 2.0

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Looking for a way to add dynamic pop-out menus to your website?

In ASP.NET 1.0 and Visual Studio 2003 you had only two options — build it yourself in JavaScript or resort to a third-party solution. Fortunately ASP.NET 2.0 and Visual Studio 2005 provide a much better solution — the new Menu server control.

The new menu server control emits the JavaScript necessary to create a great-looking pop-out menu customized to your look-and-feel requirements and provides hierarchical links to all the high-points on your site.

Unfortunately, leveraging this control isn’t quite as easy as dropping it on your form.

In this video, you’ll learn how to create an XML-based site-map description document that the Menu control can use as its DataSource for displaying menu option links in the appropriate structure. You also discover how to use the built-in styles to customize the colors and fonts used by the menu. In short, you’ll have everything you need to take your site navigation to a whole new level.


More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read