Part 158 Binding asp net menu control to web sitemap file using sitemapdatasource control

  • دعنا نشارك هذا :
ترتيب الدرس : 158
المدة : 00:04:07
التحكم :
Text version of the video
http://csharp-video-tutorials.blogspot.com/2013/10/part-158-binding-aspnet-menu-control-to.html

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation1

Slides
http://csharp-video-tutorials.blogspot.com/2014/10/binding-aspnet-menu-control-to.html

All ASP .NET Text Articles
http://csharp-video-tutorials.blogspot.com/p/free-aspnet-video-tutorial.html

All ASP .NET Slides
http://csharp-video-tutorials.blogspot.com/p/aspnet-slides.html

ASP.NET Playlist
https://www.youtube.com/playlist?listPL4cyC4G0M1RQcB4IYS_zwkyBwMyx5AnDM

All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view1&sortdd

All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists

This is continuation to Part 157. Please watch Part 157, before proceeding. In Part 155, we discussed binding menu control to an xml file using xmldatasource control.

It is also possible to bind menu control to web.sitemap file.

Here are the steps to achieve this.
1. Add web.sitemap file.

2. Drag and drop "SiteMapDataSource" control onto the webform. By default, a SiteMapDataSource control reads data automatically from web.sitemap file.

3. Finally drag and drop Menu control onto the webform and set DataSourceID attribute, to the ID of the SiteMapDataSource control created in Step 2.

That's it. Run the application and notice that, the Menu control is bound to web.sitemap file. One problem here is that, the Root node is also displayed.

Hiding Root node in the Menu control.
To hide the Root node in the Menu control, set ShowStartingNode attribute of the SiteMapDataSource control to false.

سيتم تفعيل التعليقات قريبا

y
Sep 23, 2020 07:32:27
youtube