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
|
|
|
// SiteMapPath Control ///////////////////////////////
<asp:SiteMapPath runat="Server" ID="SiteMapPath1" BorderWidth="1" BorderStyle="Double" BorderColor="BurlyWood">
</asp:SiteMapPath>
|