I am totally agree with
Tadit in
Solution 1[
^].
Here, I am adding some more information about
ASP.NET Web Server Control Event Model[
^].
The
onClick
event for a
MenuItem
only fires when there is not a
NavigateUrl
set for the item.If you take a look at the source of the page as it is rendered to the browser, you will notice that
MenuItems
that have a
NavigateUrl
set will render as simple anchor tags inside of a span, which means
no postback will occur and the event handler will not fire.
--Amy