New 2.0 Menu control. Opinions and resources welcome.

  • Thread starter Electrified Research
  • Start date
E

Electrified Research

The new ASP.NET 2.0 Menu control seems to have some very cool features.
But there are some things I don't like. Heavy implimentation of
inline style. Some of which I cannot remove. The <a> tags all
implement style="cursor:text". The stylesheet in the header begins to
get larger and larger as you create a more complex menu and apply
styles.

I like the menu archatecture but what I want to do is two things:
1. REMOVE ALL STYLE DEFINITIONS WITHIN THE PAGE.
2. REMOVE ALL INLINE STYLES WITHIN THE MENU.

It would be also nice to:
3. REMOVE ALL INLINE EVENT HANDLER DEFINITIONS.
eg. onmouseover="Menu_HoverStatic(this)"

So far I only see my options being re-writing the entire control
hopefully inheriting from it and reusing as much functionality as
possible. The rendering of the menu is somewhat black box and I'm not
sure what all goes on during the OnPreRender method. I know that if I
override the OnPreRender without executing base.OnPreRender the style
definitions for the Menu control disapear. GREAT! That takes care of
#1, but what else does it mess with. :(

Any help would be great. But if anyone feels that this is just too
much effort in hopes of cleaning up HTML, I'd love to hear it.

My experience with building high traffic websites has put me in the
belief that every byte counts and any possibility of removing
unneccesary code should be explored

Note that what I intend to do is use class="[name]" to apply all styles
and apply behaviors (onmouseover, etc) by parsing the document tree and
applying the event handlers, etc, etc. I'm already doing this with
other websites.

Again, any help, resources, or opinions welcome.
 
E

Electrified Research

;) Again this is a great feature of the menu and provides more
incentive to use the menu, but it still doesn't solve my problem.

The template is still encapsulated in an <a> tag. You don't have to
take responsibility for events, and the contents of the templates still
shouldn't too complex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top