<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHeader" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderForTitleAndIntro" Runat="Server">
<table width="100%" cellpadding="2" cellspacing="0">
<tr valign="top" class="ArticleTitle">
<td style="padding-left:10px;" valign="middle">
asp:SiteMapDataSource control</td>
</tr>
<tr>
<td class="ArticleContents">
The SiteMapDataSource control is used as a data source to place a site map (breadcrumbs) to the website. A site map is a way to present all folders and pages of the website.
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderForContents" Runat="Server">
<div class="ArticleContents">
The SiteMapDataSource control is used as a data source to place a site map (breadcrumbs) to the website. A site map is a way to present all folders and pages of the website. A site map is a way to present all folders and pages of the website.
The site map information can appear in many forms. SiteMapDataSource control is used generally as a data source for asp:SiteMapPath control.
<p>
By default, this control takes root's web.sitemap file as the source file to display sitemap.
</p>
<br /><br />
<table width="100%" class="TutoPropPlaceHolder" border="1" cellpadding="2" cellspacing="1">
<tr>
<th colspan="2" align="left">
Some Important Properties of SiteMapDataSource Control
</th>
</tr>
<tr>
<td class="DemoCP">SiteMapProvider</td>
<td>
Gets or sets the name of the site map provider. This information is written in web.config file.
</td>
</tr>
<tr>
<td class="DemoCP">StartingUrlNode</td>
<td>
Used to set the URL in the sitemap that will be considered as root.
</td>
</tr>
<tr>
<td class="DemoCP">ShowStartingNode</td>
<td>
true/false. Whether to show starting node or not.
</td>
</tr>
</table>
<!-- START - Demo Section -->
<table class="DemoPlaceHolder" border="1" cellpadding="2" cellspacing="4">
<tr>
<td class="DemoTitle">
DEMO : SiteMapDataSource
</td>
<td align="right">
<a class="DemoShowSource" href="../../misc/codeviewer/default.aspx?pagename=~/tutorials/controls/sitemapdatasource.aspx" target="_blank">Show Source Code</a>
</td>
</tr>
<tr>
<td>
<asp:SiteMapPath runat="Server" ID="SiteMapPath1" BorderWidth="1" BorderStyle="dotted" BorderColor="red">
</asp:SiteMapPath>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="2">
<!-- START - Server Side Code -->
<pre>
// SiteMapPath Control ///////////////////////////////
<asp:SiteMapPath runat="Server" ID="SiteMapPath1" BorderWidth="1" BorderStyle="dotted" BorderColor="red">
</asp:SiteMapPath>
// SiteMapNode used to display SiteMap ///////////////////////////////
// Place following code into web.sitemap file and place it into the root folder of your application
<siteMapNode url="~/default.aspx" title="Home" description="Go to home page">
<siteMapNode url="~/tutorials/default.aspx" title="Tutorials" description=".NET Tutorials">
<siteMapNode url="~/tutorials/controls/sitemapdatasource.aspx" title="SiteMapDataSource Control" description="SiteMapDataSource Control tutorials" />
</siteMapNode>
</siteMapNode>
</pre>
<!-- END - Server Side Code -->
</td>
</tr>
</table>
<!-- END - Demo Section -->
</div>
<br />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderFooter" Runat="Server">
</asp:Content>
Go Top