In this article I will explain how to use sitemappath navigation control or create breadcrumb for web application with example in asp.net.
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="Home Page">
<siteMapNode url="Careers.aspx" title="Careers" description="Careers Page" >
<siteMapNode url="Jobs.aspx" title="Jobs" description="Jobs Page" />
</siteMapNode>
<siteMapNode url="ContactUs.aspx" title="Contact" description="ContacUs Page" />
</siteMapNode>
</siteMap>
|
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"
runat="server">
<title>Site Navigation or BreadCrumb Example in asp.net</title>
</head>
<body>
<form id="form1"
runat="server">
<div>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
/>
<asp:SiteMapPath ID="SiteMap1"
runat="server"></asp:SiteMapPath>
</div>
</form>
</body>
</html>
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|



Subscribe by RSS
Subscribe by Email
9 comments :
Nice one!!!
+
To stop showing the root node add this in sitemappath --> ShowStartingNode="False"
easy way learning of the asp.net
Hi,
Great article.
Thanx..
But how to implement category ,sub category in e-commerce application
Is it possible to create a horizontal menu using the below sitemap file? The menu should display.....
home menu1 menu2 menu3 menu4>menusub1 etc.......
The problem with the current sitemap is that everything is under the top "Home" node. and i also set orientation=horizontal but still not getting.....i know this problem is nothing but annoying me....please help
Is it possible to create a horizontal menu using the below sitemap file? The menu should display.....
home menu1 menu2 menu3 menu4>menusub1 etc.......
?xml version="1.0" encoding="utf-8" ?>
The problem with the current sitemap is that everything is under the top "Home" node. and i also set orientation=horizontal but still not getting.....i know this problem is nothing but annoying me....please help
Is it possible to create a horizontal menu using the below sitemap file? The menu should display.....
home menu1 menu2 menu3 menu4>menusub1 etc....
The problem with the current sitemap is that everything is under the top "Home" node. and i also set orientation=horizontal but still not getting.....i know this problem is nothing but annoying me....please help
thanks