Part 157 SiteMapPath control in asp net

Published: 27 October 2013
on channel: kudvenkat
62,730
177

Text version of the video
http://csharp-video-tutorials.blogspo...

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.
   / @aarvikitchen5572  

Slides
http://csharp-video-tutorials.blogspo...

All ASP .NET Text Articles
http://csharp-video-tutorials.blogspo...

All ASP .NET Slides
http://csharp-video-tutorials.blogspo...

ASP.NET Playlist
   • ASP.NET Tutorial for beginners in arabic  

All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenka...

All Dot Net and SQL Server Tutorials in Arabic
   / kudvenkatarabic  

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.ItemType == SiteMapNodeItemType.Root ||
(e.Item.ItemType == SiteMapNodeItemType.PathSeparator && e.Item.ItemIndex == 1))
{
e.Item.Visible = false;
}
}


Watch video Part 157 SiteMapPath control in asp net online without registration, duration hours minute second in high quality. This video was added by user kudvenkat 27 October 2013, don't forget to share it with your friends and acquaintances, it has been viewed on our site 62,730 once and liked it 177 people.