Part 157 SiteMapPath control in asp net

  • دعنا نشارك هذا :
ترتيب الدرس : 157
المدة : 00:10:17
التحكم :
Text version of the video
http://csharp-video-tutorials.blogspot.com/2013/10/part-157-sitemappath-control-in-aspnet.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/sitemappath-control-in-aspnet.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

In this video, we will discuss SiteMapPath control. This is continuation to Part 156, please watch Part 156 before proceeding.

SiteMapPath control displays navigation path. This navigation path is often called as breadcrumb. Using SiteMapPath control is straight forward.

1. Drag and drop SiteMapPath control
2. Right click on the project name in solution explorer and add a SiteMap file.

That's it we are done. Run the application and notice that SiteMapPath control displays the navigation path. The SiteMapPath control automatically reads data from Web.sitemap file.

At the moment, the only problem is that it is displaying DummyRoot node as well. Here are the steps to hide the Root node in SiteMapPath control in asp.net.
1. Specify OnItemCreated attribute for the SiteMapPath control on the master page.
2. Copy and paste the following code in the code-behind file of the master page
protected void SiteMapPath1_ItemCreated(object sender, SiteMapNodeItemEventArgs e)
{
if (e.Item.ItemTypeSiteMapNodeItemType.Root
(e.Item.ItemTypeSiteMapNodeItemType.PathSeparator && e.Item.ItemIndex1))
{
e.Item.Visiblefalse;
}
}

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

y
Sep 23, 2020 07:32:27
youtube