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.
|
|
||
|
|||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.