<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://aspnet.4guysfromrolla.com/rss/rss2html.xsl" version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>4GuysFromRolla.com :: Site Navigation Article Series</title>
<link>http://aspnet.4guysfromrolla.com/articles/111605-1.aspx</link>
<description>An article series on ASP.NET version 2.0's site navigation system.</description>
<language>en-us</language>
<webMaster>mitchell@4guysfromrolla.com (Scott Mitchell)</webMaster>
<atom:link href="http://aspnet.4guysfromrolla.com/rss/siteNavigation.xml" rel="self" type="application/rss+xml" />

<item>
	<title>Examining ASP.NET 2.0&apos;s Site Navigation - Part 5</title>
	<description>
&lt;table align=&quot;center&quot; style=&quot;BORDER-RIGHT: #333 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #333 1px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 8px; BORDER-LEFT: #333 1px solid; WIDTH: 77%; PADDING-TOP: 8px; BORDER-BOTTOM: #333 1px solid; BACKGROUND-COLOR: lightyellow&quot;&gt;&lt;tr&gt;&lt;th&gt;A Multipart Series on ASP.NET 2.0&apos;s Site Navigation&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;

This article is one in a series of articles on ASP.NET 2.0&apos;s site navigation functionality.
&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/111605-1.aspx&quot;&gt;Part 1&lt;/a&gt; - shows how to create a simple site map 
      using the default XML-based site map provider and how to display a 
      TreeView and SiteMapPath (breadcrumb) based on the site map data.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/113005-1.aspx&quot;&gt;Part 2&lt;/a&gt; - explores programmatically accessing
site map data through the &lt;code&gt;SiteMap&lt;/code&gt; class; 
      includes a thorough discussion of the SiteMapPath (breadcrumb) control.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/122805-1.aspx&quot;&gt;Part 3&lt;/a&gt; - examines how to use base the site map&apos;s 
      contents on the currently logged in user and the authorization rules 
      defined for the pages in the site map.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/020106-1.aspx&quot;&gt;Part 4&lt;/a&gt; - delves into creating a custom site
map provider, specifically one that bases the site map on the website&apos;s physical, file system structure.&lt;/li&gt;

&lt;li&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/030806-1.aspx"&gt;Part 5&lt;/a&gt; - see how to customize the markup
displayed by the navigation controls, and how to create your own custom navigation UI.&lt;/li&gt;

&lt;p align=&quot;right&quot;&gt;

(&lt;a href=&quot;http://aspnet.4guysfromrolla.com/rss/siteNavigation.xml&quot;&gt;Subscribe to this Article Series!
&lt;img src=&quot;http://www.aspmessageboard.com/images/xml.gif&quot; width=&quot;36&quot; height=&quot;14&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;

The site navigation features in ASP.NET 2.0 make it easy to &lt;a href="http://aspnet.4guysfromrolla.com/articles/111605-1.aspx"&gt;define 
a site map&lt;/a&gt; and implement common navigation UI elements, such as a breadcrumb, treeview, and menu. Due to its use of
&lt;a href="http://aspnet.4guysfromrolla.com/articles/101905-1.aspx"&gt;the provide model&lt;/a&gt;, you can dictate how to serialize
the site map. ASP.NET 2.0 ships with a default implementation that serializes site map information to an XML-formatted file
(&lt;code&gt;Web.sitemap&lt;/code&gt;, by default), but as we saw in &lt;a href="http://aspnet.4guysfromrolla.com/articles/020106-1.aspx"&gt;Part 4&lt;/a&gt;
this logic can be customized to garner site map information directly from the file system or &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/02/WickedCode/"&gt;through
a SQL Server database table&lt;/a&gt;. Site navigation can even be &lt;a href="http://aspnet.4guysfromrolla.com/articles/122805-1.aspx"&gt;configured 
to use security trimming&lt;/a&gt;, which will remove those nodes in the site map for which the currently logged on user does not 
have authorization to view.
&lt;p&gt;
The site map provider model and security trimming features are used to customize the set of site map nodes used by the navigation
Web controls, and afford a great deal of customization. However, there are times where we may want to customize the rendered
output of the navigation control based on the site map data. For example, maybe in our Menu control we want to
display an icon next to each menu item depending on some classification defined for the menu item's corresponding site map 
node. Alternatively, the markup rendered by ASP.NET's built-in navigation controls may not suit our needs. Rather than
displaying a TreeView or Menu, we may want to show the site navigation information in a bulleted list. Such functionality is
possible by directly working with the &lt;a href="http://msdn2.microsoft.com/en-US/library/system.web.sitemap.aspx"&gt;&lt;code&gt;SiteMap&lt;/code&gt;&lt;/a&gt;
class.
&lt;p&gt;
In this article we'll look at how to accomplish a hodgepodge of customizations when rendering the navigation UI controls.
Read on to learn more!


	</description>
	<guid>http://aspnet.4guysfromrolla.com/articles/030806-1.aspx</guid>
	<link>http://aspnet.4guysfromrolla.com/articles/030806-1.aspx</link>
	<pubDate>Wed, 08 Mar 2006 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>

<item>
	<title>Examining ASP.NET 2.0&apos;s Site Navigation - Part 4</title>
	<description>
&lt;table align=&quot;center&quot; style=&quot;BORDER-RIGHT: #333 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #333 1px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 8px; BORDER-LEFT: #333 1px solid; WIDTH: 77%; PADDING-TOP: 8px; BORDER-BOTTOM: #333 1px solid; BACKGROUND-COLOR: lightyellow&quot;&gt;&lt;tr&gt;&lt;th&gt;A Multipart Series on ASP.NET 2.0&apos;s Site Navigation&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;

This article is one in a series of articles on ASP.NET 2.0&apos;s site navigation functionality.
&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/111605-1.aspx&quot;&gt;Part 1&lt;/a&gt; - shows how to create a simple site map 
      using the default XML-based site map provider and how to display a 
      TreeView and SiteMapPath (breadcrumb) based on the site map data.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/113005-1.aspx&quot;&gt;Part 2&lt;/a&gt; - explores programmatically accessing
site map data through the &lt;code&gt;SiteMap&lt;/code&gt; class; 
      includes a thorough discussion of the SiteMapPath (breadcrumb) control.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/122805-1.aspx&quot;&gt;Part 3&lt;/a&gt; - examines how to use base the site map&apos;s 
      contents on the currently logged in user and the authorization rules 
      defined for the pages in the site map.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/020106-1.aspx&quot;&gt;Part 4&lt;/a&gt; - delves into creating a custom site
map provider, specifically one that bases the site map on the website&apos;s physical, file system structure.&lt;/li&gt;&lt;p align=&quot;right&quot;&gt;

(&lt;a href=&quot;http://aspnet.4guysfromrolla.com/rss/siteNavigation.xml&quot;&gt;Subscribe to this Article Series!
&lt;img src=&quot;http://www.aspmessageboard.com/images/xml.gif&quot; width=&quot;36&quot; height=&quot;14&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;

The goal of ASP.NET&apos;s site navigation feature is to allow a developer to specify a &lt;i&gt;site map&lt;/i&gt; that describes his website&apos;s
logical structure. A site map is constructed of an arbitrary number of hierarchically-related &lt;i&gt;site map nodes&lt;/i&gt;, which 
typical contain a name and URL. The site navigation API, which is available in the .NET Framework via the &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.web.sitemap.aspx&quot;&gt;&lt;code&gt;SiteMap&lt;/code&gt;&lt;/a&gt;

class, has properties for accessing the root node in the site map as well as the &quot;current&quot; node (where the &quot;current&quot; node is
the node whose URL matches the URL the visitor is currently on).  As discussed in 
&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/113005-1.aspx&quot;&gt;Part 2&lt;/a&gt; of this article series, the data from the site 
map can be accessed programmatically or through the navigation Web controls (the SiteMapPath, TreeView, and Menu controls).
&lt;/p&gt;&lt;p&gt;
The site navigation features are implemented using the &lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/101905-1.aspx&quot;&gt;provider
model&lt;/a&gt;, which provides a standard API (the &lt;code&gt;SiteMap&lt;/code&gt; class) but allows developers to plug in their own 
implementation of the API at runtime. ASP.NET 2.0 ships with a single default implementation, 

&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.web.xmlsitemapprovider.aspx&quot;&gt;&lt;code&gt;XmlSiteMapProvider&lt;/code&gt;&lt;/a&gt;,
with which the developer can define the site map through an XML file (&lt;code&gt;Web.sitemap&lt;/code&gt;); &lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/111605-1.aspx&quot;&gt;Part 1&lt;/a&gt;
of this article series looked at defining this XML file. However, our site&apos;s structure might already be specified by existing
database data, or perhaps by the folders and files that makeup our website. Rather than having to mirror the database or
file system structure in a &lt;code&gt;Web.sitemap&lt;/code&gt; file, we can create a &lt;em&gt;custom provider&lt;/em&gt; that exposes the database
or file system information as a site map.

&lt;/p&gt;&lt;p&gt;
Thanks to the provider model we can provide a custom implementation of the site navigation subsystem, but one that still
is accessible through the &lt;code&gt;SiteMap&lt;/code&gt; class. In essence, with a custom provider the &lt;code&gt;SiteMap&lt;/code&gt; class
and navigation Web controls will work exactly as they did with the &lt;code&gt;XmlSiteMapProvider&lt;/code&gt;. The only difference will
be that the site map information will be culled from our own custom logic, be it from a database, a Web service, the file system,
or from whatever data store our application may require. In this article we&apos;ll look at how to create a custom site 
navigation provider and build a file system-based custom provider from the ground-up. Read on to learn more!

&lt;br /&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/020106-1.aspx&quot; class=&quot;readmore&quot;&gt;Read More &amp;gt;&lt;/a&gt;&lt;/p&gt;
	</description>
	
	<guid>http://aspnet.4guysfromrolla.com/articles/020106-1.aspx</guid>
	<link>http://aspnet.4guysfromrolla.com/articles/020106-1.aspx</link>
	<pubDate>Wed, 02 Feb 2006 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>

<item>
	<title>Examining ASP.NET 2.0&apos;s Site Navigation - Part 3</title>
	<description>
&lt;table align="center" style="BORDER-RIGHT: #333 1px solid; PADDING-RIGHT: 8px; BORDER-TOP: #333 1px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 8px; BORDER-LEFT: #333 1px solid; WIDTH: 77%; PADDING-TOP: 8px; BORDER-BOTTOM: #333 1px solid; BACKGROUND-COLOR: lightyellow"&gt;
&lt;tr&gt;&lt;th&gt;A Multipart Series on ASP.NET 2.0's Site Navigation&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;
This article is one in a series of articles on ASP.NET 2.0's site navigation functionality.
&lt;br /&gt;&lt;br /&gt;
&lt;li&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/111605-1.aspx"&gt;Part 1&lt;/a&gt; - shows how to create a simple site map 
      using the default XML-based site map provider and how to display a 
      TreeView and SiteMapPath (breadcrumb) based on the site map data.&lt;/li&gt;
      
&lt;li&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/113005-1.aspx"&gt;Part 2&lt;/a&gt; - explores programmatically accessing
site map data through the &lt;code&gt;SiteMap&lt;/code&gt; class; 
      includes a thorough discussion of the SiteMapPath (breadcrumb) control.&lt;/li&gt;
      
&lt;li&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/122805-1.aspx"&gt;Part 3&lt;/a&gt; - examines how to use base the site map's 
      contents on the currently logged in user and the authorization rules 
      defined for the pages in the site map.&lt;/li&gt;
      
&lt;p align="right"&gt;
(&lt;a href="http://aspnet.4guysfromrolla.com/rss/siteNavigation.xml"&gt;Subscribe to this Article Series!
&lt;img src="http://www.aspmessageboard.com/images/xml.gif" width="36" height="14" border="0" /&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;In addition to this article series on ASP.NET 2.0's site navigation, I am also currently authoring an article series on
&lt;a href="http://aspnet.4guysfromrolla.com/articles/120705-1.aspx"&gt;ASP.NET 2.0's membership, roles, and profile&lt;/a&gt;.
The membership system in ASP.NET provides a programmatic API for creating and managing user accounts, whereas the roles 
piece enables a developer to define a set of roles and to associate users with roles. A website that provides user accounts
typically has certain sections of the site that are accessible only to certain users, only to authenticated users, or
to users that belong to a particular role.
&lt;/p&gt;&lt;p&gt;
For example, a website might have a set of pages that allow a trusted user to edit the content
of the website, or manage the existing users. Rather than simply trying to hide this page and hope no one accidentally
stumbles across it, or hard coding authorization rights to only allow in a single user, a more robust and secure approach
is to define an Administrator role that is then assigned to a select handful of trusted users. These administrative web pages
can then be configured to allow access only to those users in the Administrator role. Similarly, the website may contain
a set of pages that only authenticated users can access.
&lt;/p&gt;&lt;p&gt;
Since certain sections of the site might only be accessible by certain users this leaves us in
a delimma with site navigation. Do we include those pages that only authorized users can access in the website's site map?
If we do, then &lt;i&gt;all&lt;/i&gt; users will see the restricted pages in the site's Menu or TreeView. Why show the links to these
pages for users who can't access them? If we leave out the restricted pages from the site map altogether, then those users 
that are authorized to view those pages can't easily navigate to them because they're not part of the site map and therefore
don't appear in the site's TreeView or Menu!
&lt;/p&gt;&lt;p&gt;
Thankfully, ASP.NET 2.0's site navigation provides a feature called &lt;i&gt;security trimming&lt;/i&gt;. When obtaining site map
information with security trimming enabled, only those site map nodes that the currently logged on user has authorization
to visit are available. That means the site's TreeView or Menu will contain just those sections accessible by the currently
logged in user. Read on to learn how to configure site navigation to support security trimming!
&lt;br /&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/122805-1.aspx" class="readmore"&gt;Read More &gt;&lt;/a&gt;
&lt;/p&gt;
	</description>
	
	<guid>http://aspnet.4guysfromrolla.com/articles/122805-1.aspx</guid>
	<link>http://aspnet.4guysfromrolla.com/articles/122805-1.aspx</link>
	<pubDate>Wed, 28 Dec 2005 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>

<item>
	<title>Examining ASP.NET 2.0&apos;s Site Navigation - Part 2</title>
	<description>
&lt;table style=&quot;background-color:lightyellow;border:1px solid #333; padding:8px;&quot;&gt;&lt;tr&gt;&lt;th&gt;A Multipart Series on ASP.NET 2.0&apos;s Site Navigation&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;

This article is one in a series of articles on ASP.NET 2.0&apos;s site navigation functionality.
&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/111605-1.aspx&quot;&gt;Part 1&lt;/a&gt; - shows how to create a simple site map 
using the default XML-based site map provider and how to display a TreeView and SiteMapPath (breadcrumb) based on the site map
data.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/113005-1.aspx&quot;&gt;Part 2&lt;/a&gt; - explores programmatically accessing
site map data through the &lt;code&gt;SiteMap&lt;/code&gt; class; includes a thorough discussion of the SiteMapPath (breadcrumb) control.&lt;/li&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;

Any website that is composed of more than one page needs some sort of navigation user interface, which is created in a two-step
process. First, the site&apos;s logical structure must be defined; then, user interface elements are added to allow the user
to move between sections of the site&apos;s sturcture. Prior to ASP.NET 2.0, developers were required to tackle both of these
steps on their own. With version 2.0, however, ASP.NET provides a simple way to define a site&apos;s structure and includes
a handful of Web controls designed specifically to display site navigation user interfaces.
&lt;/p&gt;&lt;p&gt;
In &lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/111605-1.aspx&quot;&gt;Part 1&lt;/a&gt; of this multi-part series of ASP.NET 2.0&apos;s
site navigation features we examined how to create the &lt;code&gt;Web.sitemap&lt;/code&gt; XML site map file and how to display site 
navigation information through the site navigation Web controls, which include:

&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;SiteMapPath&lt;/b&gt;, which displays a breadcrumb (Home &amp;gt; Electronics &amp;gt; XBOX)&lt;/li&gt;&lt;li&gt;&lt;b&gt;TreeView&lt;/b&gt;, which displays a collapsible, vertically displayed tree, showing the entire site map hierarchy&lt;/li&gt;&lt;li&gt;&lt;b&gt;Menu&lt;/b&gt;, which displays either a horizontally- or vertically-aligned menu&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Part 1 only provided a cursory introduction to both the site map file and navigation Web controls&apos; functionalities and
capabilities. In this second part of the article series we&apos;ll turn our attention to programmatically working with the
site map information, as well as looking at the SiteMapPath navigation Web controls in detail. Read on to learn more!

&lt;br /&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/113005-1.aspx&quot; class=&quot;readmore&quot;&gt;Read More &amp;gt;&lt;/a&gt;&lt;/p&gt;
	</description>
	
	<guid>http://aspnet.4guysfromrolla.com/articles/113005-1.aspx</guid>
	<link>http://aspnet.4guysfromrolla.com/articles/113005-1.aspx</link>
	<pubDate>Wed, 30 Nov 2005 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>


<item>
	<title>Examining ASP.NET 2.0&apos;s Site Navigation - Part 1</title>
	<description>
&lt;p&gt;&lt;table align=&quot;center&quot; style=&quot;background-color:lightyellow;border:1px solid #333; padding:8px;&quot;&gt;&lt;tr&gt;&lt;th&gt;A Multipart Series on ASP.NET 2.0&apos;s Site Navigation&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;

This article is the first on a series of articles on ASP.NET 2.0&apos;s site navigation functionality. This first part of
the series examines the basics of site navigation, showing how to create a simple site map using the default XML-based
site map provider. Future articles will cover more advanced features of site maps as well as how to create a custom
site map provider.
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;
Any website that is composed of more than one page needs some sort of navigation user interface. A navigation user interface
might be as simple as static hyperlinks to the other pages in the site, or might involve the use of menus or trees.
But before a navigation user interface can be created for a site, the site&apos;s logical structure must first be
defined. (This logical structure is often referred to as a &lt;i&gt;site map&lt;/i&gt;.)
For example, a website like Amazon.com is arranged into various sections by product line, like Books, Electronics,
Computers, DVDs, and so on. Each of these sections may have sub-sections. Books is broken down into categories like
Accessories, Books on CD, Novels, History, Romance, and so on. Typically, these logical structures form a hierarchy of
sorts. The screenshot below shows an abbreviated version of Amazon.com&apos;s site map.
&lt;/p&gt;&lt;p&gt;&lt;center&gt;&lt;img src=&quot;http://aspnet.4guysfromrolla.com/images/siteStructure.gif&quot; width=&quot;366&quot; height=&quot;155&quot; border=&quot;0&quot; alt=&quot;The site structure of Amazon.com...&quot; /&gt;&lt;/center&gt;&lt;/p&gt;&lt;p&gt;Once the site map has been defined, the site&apos;s navigation user interface can be created. At Amazon.com, the main page
lists links to each of the main sections along the left-hand side of the page. Drilling down into a particular section
lists that section&apos;s sub-sections on the left. Other navigation user interfaces could be used as well, though: you might
have a tree showing the various sections and sub-sections, or a menu that listed as top-level menu items the sections
like Books, Electronics, DVDs, and so on, with those menu items&apos; submenus containing the respective section&apos;s sub-sections.

&lt;/p&gt;&lt;p&gt;
Prior to ASP.NET 2.0, developers typically rolled their own site navigation solutions. ASP.NET 2.0, however, makes
defining a site&apos;s structure and implementing it using common navigation user interface elements a walk in the park.
In this article we&apos;ll look at ASP.NET 2.0&apos;s &lt;i&gt;site navigation&lt;/i&gt; features. Read on to learn more!
&lt;br /&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/111605-1.aspx&quot; class=&quot;readmore&quot;&gt;Read More &amp;gt;&lt;/a&gt;&lt;/p&gt;
	</description>

	<guid>http://aspnet.4guysfromrolla.com/articles/111605-1.aspx</guid>
	<link>http://aspnet.4guysfromrolla.com/articles/111605-1.aspx</link>
	<pubDate>Wed, 16 Nov 2005 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>
</channel>
</rss>
