views:

691

answers:

3

I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and security trimmings. There are only 21 menu options, but the results HTML of the menu is a whopping 14k. The site is hosted on our company's intranet and must be serverd to people worldwide on limited bandwidth, so I'd like to reduce the size of the menus.

What is the best way to do this? Does anybody have a good reference? I have the following constraints:

  • The solution cannot reference any 3rd part DLL files (getting approval would be a nightmare)
  • Must work with IE 6

CSS and JavaScript are fine, as long as they work with IE 6.

+2  A: 

Take a look at: http://www.asp.net/CSSAdapters/Menu.aspx

The default Menu control is rendering far too much HTML.

KP
the only problem here is IE 6 does not support pure CSS menus.
Richard
I've also had problems with the "Selectable" property on a menuItem being ignored once the CSSAdapters were applied to a menu.
Dav Evans
A: 

As a side note, to reduce bandwith usage, make sure compression is on:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/502ef631-3695-4616-b268-cbe7cf1351ce.mspx?mfr=true

Stu
+1  A: 

You might have a look at my ASP.NET menu optimization post. What I do is extracting the common part of the menu rendered in every page to an external file that is loaded and cached only once at the user browser. This way the pages are 60-70% smaller in some cases.

Good Job and nice post on the Menu Control Optimization. +1
KP