Skip Navigation LinksHome > Categories > Code from a Category

Asp.net SiteMapPath Navigation Control - BreadCrumb in Asp.Net



User Name: codelecturer
Name: Mike Chauhan
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD... [More]
Viewed Times: 2360
Add Date: 02/05/2013
In this article I will explain how to use sitemappath navigation control or create breadcrumb for web application with example in asp.net.
Sitemap navigation is a control which allows users to know the current page location with respect to home page. To implement this concept

First create one new web application >> Right click on application and select Add New Item >> Select Web Form >> Give name as Careers.aspx >> Click OK

Similar way you can add two more pages and give names as Jobs.aspx and ContactUs.aspx page

Once pages added to website >> Right click on website and select Add New Item >> Select SiteMap >> Click OK

Once SiteMAP added to website open SiteMAP and write the following code

If you observe above sitemap I added Career.aspx page and ContactUs.aspx pages under Default.aspx page and I added Jobs.aspx under Career.aspx page.

Now if we open Jobs.aspx page we will get sitemap like this

Home >> Careers >> Jobs

For example if we open ContactUs.aspx page we will get sitemap like this

Home >> Contact

Now write the following code in all aspx pages (Default.aspx, Career.aspx, Jobs.aspx and ContactUs.aspx)



After completion of add above code in all pages open Jobs.aspx and run you will find site navigation like this



If you open ContactUs.aspx page you will find site navigation output like this



Happy Programming!!!

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.