asp.net.ph

Skip Navigation Links

SiteMapPath Control Syntax

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

For information on the individual members of this class, see SiteMapPath in the class library.

Remarks

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.

Syntax Example

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>
See Also

SiteMapPath Class   SiteMapPath Web Server Control



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note