How To Use SiteMapPath Navigation Control in Asp.Net
Today in this tutorial we will learn How To Use SiteMapPath navigation Control in Asp.Net. Here I described step by step procedure to use this navigation control, I hope at the end of this tutorial you will be able to use SitmapPath navigation control. Okay so lets start the tutorial.
What is SiteMapPath ?
Before going to start the tutorial lets take a small introduction of SiteMapPath navigation control. Basically Sitemap navigation is a control which allows users to know the current page location with respect to home page or we can say that with respect to Root Node. It provides a smooth navigation to website users and enables you to store ths structure of your website at a central location that is a sitemap.How To Use SiteMapPath in Asp.Net ?
Ok friends so lets start the step by step procedure to use SiteMapPath navigation control :Step 1 ::
First create one new web application > Right click on application and select Add New Item > Select Web Form > Give name as Home.aspx > Click OK
Similar way you can add two more pages and give names as UserLogin.aspx and Profile.aspx page
Once pages added to website > Right click on website and select Add New Item > Select SiteMap > Click Add
Once SiteMAP added to website open SiteMAP and write the following code
If you observe above sitemap I added UserLogin.aspx page and Profile.aspx pages under Home.aspx page and I added Profile.aspx under UserLogin.aspx page.
Step 2 ::
Now add this sitemappath on evey page for doing this follow these steps on every pageof you website :
Explore Data Tab from toolbox > Select SiteMapDataSource
after doing this fetch SiteMapPath control from navigation tab that shown in the image given below :
now repeat the same steps on all the page of your website and save all the things.
Step 3 ::
After following above steps just run the Profile Page you will find site navigation like this :
Now click on the User you will find site navigation like this :
From the Editor’s Desk
So friends this is all about How To Use SiteMapPath Navigation Control in Asp.Net. I always tried my best to make every tutorial easily understandable to you. But still you have any problem regarding this tutorial then feel free to ask me via comments and you feel it is helpul then don't forget to share it.
Thankyou for giving your time.
How To Use SiteMapPath Navigation Control in Asp.Net
Reviewed by Team tt24
on
10:54 AM
Rating:
No comments: