views:

404

answers:

2

How do I use the ASP.NET sitemap control to render stacked horizontal css menus with styled UL/LIs? It seems to only want to do trees or flyouts.

A: 

I googled and found this thread:

http://blogs.sqlxml.org/bryantlikes/archive/2006/02/17/4839.aspx

It seems you have to build your own control. I hope it will move you in the right direction.

meep
+1  A: 

Set up a SiteMapDataSource and point it at your configured SiteMap Provider. Then bind a repeater (or whatever) to the data source. Use the repeater to emit your UL/LI sturcture.

If you need 2 levels (like nested tabs, where the second level tabs are children of the selected tab at the top) then you will need 2 SiteMapDataSources and set the starting node of the second to the selected node of the first.

This is all from memory of when I did this a couple years ago - so it may not be 100% exact.

If you have specific problems after trying it out, post and I will work out more details if needed.

Bryan Batchelder