ASP.NET Syntax ASP.NET Syntax for Web Controls
Displays a set of text or image hyperlinks that enable users to easily navigate a Web site, while taking a minimal amount of page space.
Declarative Syntax
<asp:SiteMapPath
AccessKey = "string"
BackColor = "color name | #dddddd"
BorderColor = "color name | #dddddd"
BorderStyle = "NotSet | None | Dotted | Dashed | Solid | Double | Groove |
Ridge | Inset | Outset"
BorderWidth = size
CssClass = "string"
Enabled = "True | False"
EnableTheming = "True | False"
EnableViewState = "True | False"
Font-Bold = "True | False"
Font-Italic = "True | False"
Font-Names = "string"
Font-Overline = "True | False"
Font-Size = "string | Smaller | Larger | XX-Small | X-Small | Small |
Medium | Large | X-Large | XX-Large"
Font-Strikeout = "True | False"
Font-Underline = "True | False"
ForeColor = "color name | #dddddd"
Height = size
ID = "string"
OnDataBinding = "DataBinding event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnItemCreated = "ItemCreated event handler"
OnItemDataBound = "ItemDataBound event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
ParentLevelsDisplayed = integer
PathDirection = "RootToCurrent | CurrentToRoot"
PathSeparator = "string"
RenderCurrentNodeAsLink = "True | False"
runat = "server"
ShowToolTips = "True | False"
SiteMapProvider = "string"
SkinID = "string"
SkipLinkText = "string"
Style = "string"
TabIndex = integer
ToolTip = "string"
Visible = "True | False"
Width = size
>
<CurrentNodeStyle />
<CurrentNodeTemplate>
<!-- child controls -->
</CurrentNodeTemplate>
<NodeStyle />
<NodeTemplate>
<!-- child controls -->
</NodeTemplate>
<PathSeparatorStyle />
<PathSeparatorTemplate>
<!-- child controls -->
</PathSeparatorTemplate>
<RootNodeStyle />
<RootNodeTemplate>
<!-- child controls -->
</RootNodeTemplate>
</asp:SiteMapPath>
For information on the individual members of this class, see SiteMapPath in the class library.
The SiteMapPath control is a site navigation control that reflects data that is provided by the SiteMap object. It provides a space-saving way to easily navigate a site and serves as a point of reference for where the currently displayed page is within a site. This type of control is commonly called a breadcrumb, or eyebrow, because it displays a hierarchical path of hyperlinked page names that provides an escape up the hierarchy of pages from the current location.
The SiteMapPath is useful for sites that have deep hierarchical page structures, but where a TreeView or Menu control might require too much space on a page.
The following example demonstrates how to use a SiteMapPath control declaratively in a Web Forms page. This code example demonstrates some of the rules of precedence that govern the order with which templates and styles are applied to SiteMapPath nodes.
<asp:sitemappath id="sitemappath1" runat="server"
rendercurrentnodeaslink = "true"
nodestyle-font-name = "Franklin Gothic Medium"
nodestyle-font-underline = "true"
nodestyle-font-bold = "true"
rootnodestyle-font-name = "Symbol"
rootnodestyle-font-bold = "false"
currentnodestyle-font-name = "Verdana"
currentnodestyle-font-size = "10pt"
currentnodestyle-font-bold = "true"
currentnodestyle-forecolor = "red"
currentnodestyle-font-underline = "false"
hovernodestyle-forecolor = "blue"
hovernodestyle-font-underline = "true">
<currentnodetemplate>
<asp:image id="image1" runat="server"
imageurl = "sample.jpg" alternatetext = "sample" />
</currentnodetemplate>
</asp:sitemappath>
SiteMapPath Class SiteMapPath Web Server Control