Click here to Skip to main content
15,896,153 members
Articles / Web Development / ASP.NET

Breadcrumbs in ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.32/5 (24 votes)
24 Sep 2003CPOL4 min read 370.9K   6.2K   97  
This article describes how to create breadcrumb navigation for your web site, based on its directory structure.
<%@ Page Language="C#" %>
<%@ Register TagPrefix="Sagara" Namespace="Sagara.BreadCrumbs" Assembly="BreadCrumbs" %>
<html>
<head>
	<title>ASP.NET Breadcrumbs</title>
<style type="text/css">
	a {
		color: #0000ff;
	}
</style>
</head> 

<body>
<h1>ASP.NET Breadcrumbs</h1>
<h2>Using C#</h2>

<Sagara:BreadCrumbControl id="breadcrumb" runat="Server" />

<h4>Navigate:</h4>
<ul>
	<li><a href="/">Web site root</a></li>
	<li><a href="/subdir">Sub Directory</a></li>
	<li><a href="/subdir/subsubdir">Sub Sub Directory</a></li>
</ul>

</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Sagara Software, Inc.
United States United States
Jon is a senior software developer who loves using .NET to solve problems.

When he's not fooling around with computers or reading, he's busy spending time with his super wife, Kelly, and his three boys. He also likes to take his mountain bike for a spin.

Visit my blog

Comments and Discussions