Mark Gilbert's Blog

Science and technology, served light and fluffy.

What’s on the ASP:Menu?

My current project involves building a public-facing site using Microsoft Office SharePoint Server (MOSS) 2007.  One of the first things that we needed to get set up was the navigational structure.  Much of the navbar could be constructed based on the SharePoint site structure, but one particular flyout menu needed to be built based on a custom list of links to various tools and pages in the site.  In all, this menu contains over 300 items among its three tiers.

Since this one menu item needed to be so highly customized, we decided to implement it using a site map data provider.  This allowed us to create a web.sitemap file in the web root (really just an XML file), add a custom provider to the web.config, and set our ASP:Menu control’s datasource to that provider.  It seemed like an elegant and quick way to build our custom menu.

In practice though, we hit a snag.  When the menu rendered, though, we found a 1/2 to 3/4 second delay in moving from one menu item to the next.  It was as if the page was trying to contact the server with each mouseover, even after the entire menu had been rendered and touched.

After doing some trial and error, we found that limiting the levels of the menu to 2 via the MaximumDynamicDisplayLevels property allowed the menu to respond at the speeds we expected.

Doing some more testing (with the full, 3-level, menu) showed that this was only happening when viewing the page through Internet Explorer (version 6 or 7), but NOT through Firefox 2.  The page in Firefox didn’t have any of the delays that we were seeing in IE.

This spurred us to examine what was being rendered for Internet Explorer and for Firefox.  We hypothesized that the server was trying to customize the experience for each user-agent, and perhaps wasn’t sending the most optimized code down for IE users.  Except for a few (seemingly inconsequential) differences, the page source was the between IE and Firefox.

After we had done this research, we found a forum posting (link: http://www.thescripts.com/forum/thread460679.html) on “The Scripts Developer Network” from January 2006 with this exact same scenario and results.  It was comforting to see that we weren’t the only ones hit with this, but it was frustrating that no one seemed to have a solution (even after a solid year in the field).

Seeing no good reason why this should render differently on IE and Firefox, we opened a support ticket with Microsoft.  We had created a small test application that demonstrated the issue, and emailed that to Microsoft so they could reproduce it on their end.  The tech was able to reproduce it, and did some research into what he referred to as “internal” documentation on possible causes.

In the end, the tech acknowledged that this is, in fact, a known bug with the ASP:Menu control and “will be rectified in the future release.” (source, the Microsoft email that I received letting me know that my ticket was being closed).  I imagine that the “future release” in this case is a patch or service pack for the .NET Framework, but I haven’t found a reliable post yet on when that might happen.  I welcome comments and responses to that effect.

Advertisements

February 20, 2007 - Posted by | MOSS

Sorry, the comment form is closed at this time.

%d bloggers like this: