Search
Author
ASP.NET Tutorials
Author
Sheo Narayan
Advertisements


Winners

Win Prizes

Social Presence
Like us on Facebook

Silverlight Tutorials | Report a Bug in the Tutorial
asp:SiteMapPath control
The SiteMapPath control is used to add a site map (breadcrumbs) to the website. A site map is a way to present all folders and pages of the website.
 
The SiteMapPath control is used to add a site map (breadcrumbs) to the website. A site map is a way to present all folders and pages of the website.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <span/> tag. Generally current page reference is not rendered as a link, however, it can be made clickable by setting RenderCurrentNodeAsLink=true.

Following are some important properties that are very useful.
PathSeparator Gets or sets Path separator text. (By default it is >.)
NodeStyle Sets the style of all nodes that will be displayed.
CurrentNodeStyle Sets the style on node that represent the current page.
RootNodeStyle Sets the style on the absoulte root node.
PathSeparatorStyle Sets the style of path separator.
DEMO : SiteMapPath Show Source Code
Skip Navigation Links  
                    
                    
// SiteMapPath Control ///////////////////////////////
<asp:SiteMapPath runat="Server" ID="SiteMapPath1" BorderWidth="1" BorderStyle="Double" BorderColor="BurlyWood">
    </asp:SiteMapPath>