How to add bar separator to Menu items?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gnewsgroup

    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="Me nu1_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_DataBoun d' matches delegate
    'System.EventHa ndler'

    How come? Thank you?

  • =?Utf-8?B?TWFuaXNo?=

    #2
    RE: How to add bar separator to Menu items?

    Hi,

    The event name is MenuItemDataBou nd 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_MenuItemD ataBound(ByVal sender As Object, ByVal e As
    System.Web.UI.W ebControls.Menu EventArgs) Handles Menu1.MenuItemD ataBound
    End Sub

    Protected Sub Menu1_MenuItemC lick(ByVal sender As Object, ByVal e As
    System.Web.UI.W ebControls.Menu EventArgs) Handles Menu1.MenuItemC lick
    Response.Write( e.Item.Text + "</br>")
    e.Item.ImageUrl = "aspnetdemos_ic on_start.gif"
    e.Item.Separato rImageUrl = "bar_black_bg.g if"
    End Sub

    Regards,
    Manish
    .NET UI controls for desktop, mobile, and web applications. Build stunning apps in WinForms, WPF, ASP.NET, and more. Try ComponentOne today.


    "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="Me nu1_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_DataBoun d' matches delegate
    'System.EventHa ndler'
    >
    How come? Thank you?
    >
    >

    Comment

    Working...