473,657 Members | 2,753 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:t ext". 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="Me nu_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.OnPreRende r 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 2197
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/
"Electrifie d Research" <re********@ele ctrified.net> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.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:t ext". 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="Me nu_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.OnPreRende r 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
8795
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 the records and I want to create a new instance of the user control for each record and then change the properties of the controls within each user control. The problem is that after I create the new instance of the user control, I get a...
0
2215
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 of menu I am talking about, written in Classic ASP, but I need to write the entire menu thing in Asp.Net using CSharp. I have a Sql table which has large number of menu items with problemId and parentId, through which I am trying to create and...
1
966
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 http://www.componentart.com/menu/default.aspx I would like to receive some opinions about these 2 or sugestions of any
7
2681
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 server returned an error: (500) Internal Server Error." I found a post that suggested to catch the WebException to retrieve the actual HttpWebResponse object for more information. The response returned is shown below. At first I thought this was a...
17
2339
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 deselecting the mainmenu1, the menu disappears again. what can I do. to fix the problem
2
2279
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 that sometimes wont open at exact below their parent item. They open 4 cm left of their correct location! and when I want to select one of them, they disappear!!! In other hands I can't use them. This Menu is produced programatically in Code...
5
6174
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 tabs, and the Multiview control to display the content that corresponds to the selected tab. My Menu control needs to be able to switch language from English or French depending on the language chosen by the user.
3
2141
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 Text="Maintenance" Value="Maintenance"> <asp:MenuItem Text="Employee Maintenance " Value=" Employee Maintenance ">
4
4063
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 whose logged in, the menu, or course, displays different items, sometimes just two items, other times many more. If all menu items are displaying, centering is not a problem but when only two items are displayed, the menu appears on the left hand...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8600
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7311
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5629
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1600
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.