473,503 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New 2.0 Menu control. Opinions and resources welcome.

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.

Nov 27 '05 #1
2 2187
All the new controls are templated. Go into design view and use the SmartTag
and convert the control to a template. Then you can hack it up as you like
but also have to take responsibility for events.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"Electrified Research" <re********@electrified.net> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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.

Nov 27 '05 #2
;) 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.

Nov 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8785
by: patrick_a | last post by:
Hello, I am trying to insert multiple instances of a custom user control into a placeholder on an aspx page, based on the records retrieved from the database. I use the datareader to loop through...
0
2202
by: Karthick Kumar | last post by:
Hi, I need to create a simple parent/child hierarchical menu. I have alread used the Treeview control but my requirement is slightly different than the Treeview control. I already have the kind...
1
963
by: Shapper | last post by:
Hello, I am looking for a good Menu Control. I found a few ones in Control Gallery of this web site. Some Examples: http://www.telerik.com/Default.aspx?PageId=1415...
7
2661
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
17
2324
by: GS | last post by:
the main menu in the application seemed to disappeared all together until I click on an control and select mainmenu1 in designer. then the mainmenu1 displays where it should be but running it or...
2
2269
by: Afshar | last post by:
Dear nice people around the world! Please help ending this nightmare, I have 2 problem with ASP.NET Menu control First: I have a horizontal menu at top of my page, each item have some sub-items...
5
6163
by: Brad Isaacs | last post by:
Good morning friends, I am working with ASP.NET 2.0 -- VB code behind I have created tabbed pages using the Menu control with the Multiview control. Using the menu control to display the...
3
2133
by: win | last post by:
I've create menu in a webform. <asp:Menu ID="Menu1" runat="server" CssClass="toolbar" Orientation="Horizontal"> <Items> <asp:MenuItem Text="Master" Value="Master"> <asp:MenuItem...
4
4060
by: SAL | last post by:
Hello, is there a way to menu control dynamically center itself horizontally on a page? I have placed a menu control in a panel control (no ajax) and would like it to center itself. Depending on...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.