Read XML in sitemap to generate dynamic menu in ASP.NET

ASP.Net 2.0 onwards you are provided with features like the Menu control which can be used to generate the menu from different sources. One of the popular sources of the menu control is the sitemap file.

_______________________________________________


_______________________________________________

The site map file is web.sitemap. This file can be automatically generated for a particular project from the solution explorer in the Visual Studio .Net 2005.

If you want to create a menu, just drag the menu control to your aspx page. The orientation of the menu can be controlled in the properties window. It could be horizontal or vertical. The elements like title, URL, and description found in the sitemap file is used for creating menus.

The menu control's data source is set to a function that returns the SiteMapDataSource. Finally use the DataBind method to bind the sitemap data source to the control. This would create the menu you want from the sitemap file.

Modify generated XSLT 1.0 with the xsl:namespace element
Edmond Woychowsky shares a trick for modifying generated XSLT 1.0 without worrying about someone regenerating the map. He also throws in a couple of Star Trek references for good measure.

PopTop: Usher's new CD seems like a retread
PopTop: Usher's new CD seems like a retread Updated Aug 30, 2010 06:51PM MDT error: ERROR #6901: XSLT XML Transformer Error: SAXParseException: Expected entity name for reference (, line 2, column 10) Copyright 2010 The Salt Lake Tribune. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.



FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________

Recommended XML Books

cover
cover
cover
cover
cover
cover







 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!


New XML Books Titles - Best Seller's @ Amazon.com

Visit XML Training Material Guide Homepage

Technology helps engage students - how do classroom instruction and social dynamics change when the classroom is completely dependant on modern technology?