Better Control over the ASP.NET Sitemap UI

kick it on DotNetKicks.com

I’m a fan of using ASP.NET’s web.sitemap feature, but I’m less impressed with the level of control that you have (rather, you DON’T have) over the menu controls that consume the web.sitemap datasource (http://www.BuyLifetime.com uses three menu controls that consume the same sitemap from MS Commerce Server 2007, which look 90% like what we want them to).

Wouldn’t it be nice if you could just make it into a navigation list? We all know (or should know by now) that a navigation list (whether ordered or unordered) should be just that, a hierarchical (“nested”) list of pages in your site.

To do this we can use a Repeater control and use the web.sitemap datasource as the contents.

It’s easy enough to make a one-level-deep list, and not too much more difficult to do a two-level-deep list.

   1: <asp:Repeater visible="false" runat="server" ID="siteMapAsBulletedList" DataSourceID="SiteMapDataSource1">
   2:     <HeaderTemplate><ul></HeaderTemplate>
   3:     <ItemTemplate>
   4:         <li>
   5:             <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Url") %>' Text='<%# Eval("Title") %>' />
   6:             <asp:Repeater runat="server" id="SecondLevel" DataSource='<%# ((SiteMapNode) Container.DataItem).ChildNodes %>'>
   7:                 <HeaderTemplate><ul></HeaderTemplate>
   8:                 <ItemTemplate>
   9:                     <li><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Url") %>' Text='<%# Eval("Title") %>'></asp:HyperLink></li>
  10:                 </ItemTemplate>
  11:                 <FooterTemplate></ul></FooterTemplate>
  12:             </asp:Repeater>    
  13:         </li>
  14:     </ItemTemplate>
  15:     <FooterTemplate></ul></FooterTemplate>
  16: </asp:Repeater>

Twitter Updates for 2008-06-24

  • new helpdesk policy: call the end-user with the status of their ticket once per week… 44 tickets times 5 mins per update: 1/2 day/week los #
  • @overheard why is that line fuzzy? because it’s not a line, it’s a collection of pixels arranged in a line-like fashion in an image…. #

Irony: Extender for Windows Media Center Experience

Windows Media Center is an application that started life in Windows XP Media Center Edition (MCE) and now comes standard in Windows Vista Home Premium and above (excluding Business and Enterprise).

Basically, you throw a big hard drive (RAID5, anyone?) and a TV-Tuner or two (I have 2 digital tuners, one analog tuner in mine) into a computer and with Windows Media Center you can record all of your favorite TV shows, listen to the radio, listen to your music collection, and more… either through your monitor, or on your big-screen TV. Cool idea. Works pretty well, too.

The most common Extenders for Windows Media Center are Microsoft’s own XBOX consoles (the XBOX original worked with Windows XP’s Media Center Edition, the XBOX360 works with the Vista version; the XBOX original cannot connect to the Vista version, which ticked off most early adopters).

The “old” XP MCE had a few set-top style boxes that worked as Extenders (which don’t work with the Vista version, which ticked off those early adopters). Now, the Vista version of Windows Media Center has Extenders – a few of which are even built into the TV set itself… pretty cool.

I clicked an ad and checked out the new Extenders for Windows Media Center… They have a menu item for “experience,” so I clicked on it.

Hmmm… “Buffering…” for 3 minutes isn’t the experience I was looking for… Maybe MythTV?

image

Get Adobe Flash playerPlugin by wpburn.com wordpress themes