G
Guest
I am trying to add an OnClientClick event to links in an asp:Menu.
I tried using a StaticItemTemplate to bind the MenuItem data to a LinkButton
with an OnClientClick attribute. This works fine to a point. This does get an
OnClientClick event onto the menu items but it causes the codebehind
ItemCommand for the Menu to become unwired. It seems that when my Menu is
rendered to html the link buttons in the menu have two <a> tags rendered one
inside another. The outer <a> tag has the OnClientClick event but the call to
__DoPostBack is missing its EventArgument. The inner <a> tag has the
EventArgument.
Any one know of another way to add an OnClientClick attribute to a menuItem
in an asp:Menu control?
-J
I tried using a StaticItemTemplate to bind the MenuItem data to a LinkButton
with an OnClientClick attribute. This works fine to a point. This does get an
OnClientClick event onto the menu items but it causes the codebehind
ItemCommand for the Menu to become unwired. It seems that when my Menu is
rendered to html the link buttons in the menu have two <a> tags rendered one
inside another. The outer <a> tag has the OnClientClick event but the call to
__DoPostBack is missing its EventArgument. The inner <a> tag has the
EventArgument.
Any one know of another way to add an OnClientClick attribute to a menuItem
in an asp:Menu control?
-J