473,947 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SiteMapPath Question

Hello,

I am having a little difficulty coming up with a solution for the
following requirement and I was hoping somebody might be able to offer
some help. I need to create a SiteMapPath for a category system that
supports any number of nested categories. Here's what I mean:

Category A
Category B
Category C
Category D
Category E

This information is stored in a single Categories table in my database
and looks like this:

Id ParentId Name
------------------------------------------------------
1 NULL Category A
2 1 Category B
3 2 Category C
4 NULL Category D
5 4 Category E

If the user was on the details page for Category C, the SiteMapPath
should display Home Category A Category B Category C and the user
should be able the backtrack through the nested structure.

I know that I can create a custom SiteMapProvider that can use a
database as its data source, but I am not sure if this is the right
way. Any feedback would be highly appreciated. Thanks!

Aug 16 '06 #1
1 1310
In article <11************ **********@m73g 2000cwd.googleg roups.com>,
se************@ gmail.com writes
>Hello,

I am having a little difficulty coming up with a solution for the
following requirement and I was hoping somebody might be able to offer
some help. I need to create a SiteMapPath for a category system that
supports any number of nested categories. Here's what I mean:

Category A
Category B
Category C
Category D
Category E

This information is stored in a single Categories table in my database
and looks like this:

Id ParentId Name
------------------------------------------------------
1 NULL Category A
2 1 Category B
3 2 Category C
4 NULL Category D
5 4 Category E

If the user was on the details page for Category C, the SiteMapPath
should display Home Category A Category B Category C and the user
should be able the backtrack through the nested structure.

I know that I can create a custom SiteMapProvider that can use a
database as its data source, but I am not sure if this is the right
way. Any feedback would be highly appreciated. Thanks!
I did something very similar to this. What I did was that every time the
database was changed, I wrote out a categories.site map file (the format
is very simple) and then used a standard sitemappath control in the
..aspx file. Worked a treat and avoided database hits every time.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
Aug 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
948
by: Chris | last post by:
Hi all, If I use siteMapPath with RenderCurrentNodeAsLink as true, the sitemap path is underlined overriding what I have in my CSS sheet e.g. I have no underlined hyperlinks in the css, but although siteMapPath follows the rest of the CSS style, it puts an underline in too. I use an ASP menu object which follows exactly that the CSS file says, so I'm not sure why this is happening. Any help would be appreciated.
1
3115
by: Danial | last post by:
Hi, How can I bind sitemappath (breadcrumb control of asp.net) to a custom ..sitemap file? By defualt its looking for web.sitemap file and giving me not found exception. Thanks Danial
1
4536
by: Jules | last post by:
In a ASP.NET 2.0 project I'd like to set an image as path separator in the SiteMapPath. When I edit the PathSepartor template (for this SiteMapPath) and drag an image on it, it works fine for all pages in the root of the Web project. VS2005 creates the folling aspx: <asp:SiteMapPath ID="SiteMapPath" runat="server"> <PathSeparatorTemplate> <img src="Images/arrow-right.jpg" /> </PathSeparatorTemplate> </asp:SiteMapPath>
5
3232
by: Jon via DotNetMonster.com | last post by:
Hi all, I'm using the ASP.NET sitemappath control and the ASP.NET menu control This sitemappath control works and shows the path when the page doesn't have an anchor - for example: <siteMapNode title="annual report" description="Annual report" url="Pages/ir_annuals.aspx" /> but the sitemappath control doesn't show the path if the page has the url
3
4472
by: Uriah Piddle | last post by:
Hi Gang, I have a SiteMapPath, bound to a Site Map, that traces a hierarchy down to an 'Article' leaf node. But the Article page shows one of many individual articles depending on which article the user chooses in the Articles page. The way it is set up now, if the user selects a particular article in the 'Articles' page, the SiteMap looks like this: '. . . Articles Article'. Assuming the user choses a cookie baking article, I would like...
1
2493
by: Alec MacLean | last post by:
Hi. I'm using VS2005 Pro to work on a website project for my company. The site has several navigation elements, all based on the standard VS2005 navigation components. I have high-level section navigation provided via a horizontal menu, a SiteMapPath to provide a breadcrumb and a vertical menu component on the left edge.
2
4278
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
I’m trying to create a dynamic asp.net 2.0 siteMapPath control (using VB.net). Using the xml sitemap I’ve got these three pages: productGroup.aspx productListing.aspx productDetail.aspx Each page receives a query string i.e. productGroup.aspx?id=9 The page then renders with the appropriate details which have been accessed
1
2396
by: =?Utf-8?B?bWljaGFlbHJp?= | last post by:
We are dynamically changing the title property of nodes in our sitemappath to reflect the names of products by handling the SiteMapResolve event. We have some unicode characters in our product names, stored in our db using escape characters like: "è" When we set the SiteMapNode.Title to that value it is escaped by the sitemappath to "è" which results in the ampsand and code being printed out vs the desired character of: è
0
1569
by: =?Utf-8?B?TWFoZXNoIE5pbWJhbGthcg==?= | last post by:
Hi All, I am using WCSF in my application. I have Menu control and SiteMapPath, which are consuming SiteMapDataSource source provided by WCSF. Now I have Report Details page that is not directly accessible to user. User must come to this page from other page. So I have not registered this page in RegisterSiteMapInformation function of module initializer so that it will not show in Menu.
0
10162
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9982
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11571
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11344
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10690
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6331
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4537
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3541
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.