Part 157 SiteMapPath control in asp net

preview_player
Показать описание
Text version of the video

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.

Slides

All ASP .NET Text Articles

All ASP .NET Slides

ASP.NET Playlist

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

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.

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;
}
}
Рекомендации по теме
Комментарии
Автор

Excellent teacher!!! I always choose your explanations, best asp.net teacher

edmundogriffin
Автор

Your sitemap may be slightly wrong. The "dummyroot" should really be your "home" page and all links should shoot out from it, like home->Menu1, home-> Menu1. That way we do not need to hide it in breadcrumb.

hammadkhan
Автор

kudvenkat's video is great as usual. but, the way microsoft has implemented sitemap having to write code to hide root node is ridiculous.

mgml
Автор

Great Video, as usual. But, Microsoft - really? You need to have a code-behind code to get rid of dummy root??? Couldn't have done it built-in with the site map path control, if almost every developer has to do

mgml
Автор

Hi pretty decent video! Anyway I got an error when I added a sitemap to my solution and I added the following config in web.config under system.web

<siteMap enabled="true">
<providers>
<add name="CustomerSiteMap"


</providers>
</siteMap>

The error I'm getting is
Authentication to host '' for user '' using method 'mysql_native_password' failed with message: Access denied for user ''@'My-PC' (using password: NO)

Anyway I'm not using MySQL anywhere in the solution. I found a suggestion which is to comment out the tag in machine.config which throws the error but I like to seek for a better solution and want to know the reason behind.

Thanks

SupunNimantha
Автор

Sir Please upload Web service and WCF tutorials .

Thanks a lot

siciidh
Автор

it doesn't work for me, can not hide the Dummyroot

Cybersix
Автор

شكرا على المجهود الرائع ولكن هل فية امكانية انى احمل ال slides

mohamedghoneim