Dec
10
Written by:
admin
Sunday, December 10, 2006
In a forum post not to long ago sabrina_c suggested using the web.sitemap provider as a replacement to the "back" button and "return to menu" buttons that I had implemented in the 0.7 beta.
I had heard about the new web.sitemap features in .NET 2.0 but till now haven't fully explored these features till now. I started out constructing a web.sitemap for BugNET and it works great to create a breadcrumb style navigation. The one problem I ran into was the web.sitemap is static when it comes to querystring properties (unless you hardcode them) which makes it unusable for many of the dynamic pages in the issue tracker. Searching around I found a few links on how to "customize" the rendering of the sitemap at runtime.
The MSDN article that I followed can be found here which simulates a message board forum situation where you might want to render what forum group and post you are on in the breadcrumb, much like BugNET where you are on a particular "issue".
Here is an example of the output that is created after the code modifications followed in the article.

Not apparent in the screenshot but the "issues" link is rendered using the proper query string attributes so that you can return to your last query with just a click of the button.
This added improvement makes navigating through the application much easier and one of the improvements that will be available in the final version of 0.7.
Tags: