A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Site Map and Bread Crumbs for your websiteUsing ASP.NET 2.0 it is very easy to create a site map of your website. One of the things you can do with a site map is build a bread crumb navigation style, which we will cover in this tutorial. |
On Wednesday, August 17th 2005 at 03:51 PM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 3.6 with 27 votes) |
|||
|
In a newly created ASP.NET website project, add two ASP.NET web forms: Contact.aspx and Tutorials.aspx. Along with the Default.aspx web form created by default, we now have three files. Now that we built an website composed of 3 files, let's define its structure so that the site map can be built. Right click the project and choose Add New Item. Select Site Map as seen in the screenshot below: ![]() We can have multiple Site Maps for our website, but this will be the default one. After adding Web.sitemap to the file, you can see it contains the following:
Here we'll define our site map, we want to mention the 3 files we have in the project. The Default.aspx will be the root, and the other two files, Tutorials.aspx and Contact.aspx will be situated under Default.aspx (child pages). Here's how we need to set up the Web.sitemap file:
The url attribute is self-explanatory. The title tag defines a title for the page, which will be shown in the bread crumb (and it will be linked to the URL specified in the url attribute). The content of the description attribute will be displayed when hovering the link, in a tooltip. Open the three files that compose our website, Default.aspx, Contact.aspx and Tutorials.aspx. In each one of them add a SiteMapPath from the Toolbox: ![]() Now all you have to do is compile and run. Open each page and you'll see the result: Default.aspx: ![]() Contact.aspx: ![]() Tutorials.aspx: ![]() Amazing, considering we only wrote a few lines of XML and dragged a control on the pages. Now if you add a new page named DotNetTutorials.aspx to the project, mention it in the web.Sitemap XML file as a child of Tutorials.aspx and add a SiteMapPath control to it, you will get the following result: ![]() And here is how you define the DotNetTutorials.aspx page, as a child of Tutorials.aspx:
|
||||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
||||
|
||||
Current CommentsVery Basic.... need more....
gud wrk
gud wrk
hi
good wrk.but i need the code to display different names for same pages.becoz i m using same page for different purpose.for eg i m using view_details.aspx to view products.if im clicking on the product headset it wl go ti view_details.aspx page
This is a very simple example.
In my website I have a web page that can be accessed from 4 places.
I use masterpages and at the present time my sitemap does not work. The page that is accessed from 4 places does not work.
I have added a work around UpdateQuestionStatus.?type=1" by giving each of the pages in the sitemap a unique querystring. This allows the page to build but the breadcrumbs from the site are still incorrect.
Would you please give a more detailed tutorial.
Hi
This is a very basic example. I am using one page at many places.
Thanks
www.interviewsworld.com
what a silly egxample
gdwork
Hi.
Nice tut.
Can you make one where you show us how to have 2 web.sitemap on the same page.
what a joke
hi thanks for posting this example. plz give me a example for breadcrumb using sqlserver
Related Tutorials
Related Source Code
ASP.NET Job Search