473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to add bar separator to Menu items?

I have a Menu control which is data bound to an xml document. I would
like to add a separator ("|") between two menu items.

I googled and found this: http://forums.asp.net/p/942408/1129699.aspx

So, I declared

OnDataBound="Menu1_DataBound"

in my menu declaration and implemented the DataBound event handler as
shown in the asp.net forum.

But, when check it out from my browser, I get this exception:

CS0123: No overload for 'Menu1_DataBound' matches delegate
'System.EventHandler'

How come? Thank you?

Jun 27 '08 #1
1 6042
Hi,

The event name is MenuItemDataBound but that does not seems to be working.
However, if I perform the same thing on the menuClick event then it works
fine.

Protected Sub Menu1_MenuItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemDataBound
End Sub

Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
Response.Write(e.Item.Text + "</br>")
e.Item.ImageUrl = "aspnetdemos_icon_start.gif"
e.Item.SeparatorImageUrl = "bar_black_bg.gif"
End Sub

Regards,
Manish
www.componentone.com

"gnewsgroup" wrote:
I have a Menu control which is data bound to an xml document. I would
like to add a separator ("|") between two menu items.

I googled and found this: http://forums.asp.net/p/942408/1129699.aspx

So, I declared

OnDataBound="Menu1_DataBound"

in my menu declaration and implemented the DataBound event handler as
shown in the asp.net forum.

But, when check it out from my browser, I get this exception:

CS0123: No overload for 'Menu1_DataBound' matches delegate
'System.EventHandler'

How come? Thank you?

Jun 27 '08 #2

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

Similar topics

2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
6
by: Sandy | last post by:
Hello - I have a book that illustrates pulling menu items from a Sql Server table into an ascx via a stored procedure. Is this something that is done in the real world? I do like the effect...
1
by: goRide | last post by:
Hi, I'm looking of a way (preferred - a ready class or dll) to customize the context menu. many application has more controls inside the context menu (like textbox, sliders, checkbox, panel...
4
by: Jeppe Jespersen | last post by:
How do i create a separator that only show _between_ menu items? I've tried the "StaticTopSeparatorImageUrl" property, but that also gives me a separator before the first item. Likewise, the...
0
by: iiman | last post by:
i am binding my asp.net 2.0 menu control to xmldatasource. For certain items, I need to add separator. Is this possible when you are binding? Thanks
1
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hi, friends, I am using C#.net 2005 to create a windows application. It has menu items, such as File, etc. Under File, there are more menu items, such as New Files, Working Files, etc. Under...
0
by: ARC | last post by:
Hello all, I'm a bit stumped on this one. I have a ribbon menu where I am allowing the users to hide main options that they don't use. I use a separator id in between each option to get a...
0
by: prabhuerode | last post by:
I use a separator in the menu in ASP 2.0 web application. I used SeparatorImageUrl, it is not resizeable with menu size. So kindly let know me any other possible solution.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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,...

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.