title: running javascript function each MenuItem from Asp:Menu
body: <p>I want to run an simple javascript function on each MenuItem from an asp:menu.</p>
  
  <pre><code>&lt;asp:Menu ID="_mainMenu" runat="server" ClientIDMode="Static" EnableTheming="False"
  StaticBottomSeparatorImageUrl="~/Images/menuSeparator.gif" Orientation="Horizontal"
  RenderingMode="Table" OnMenuItemClick="_menu_MenuItemClick" SkipLinkText=""&gt;
  &lt;/asp:Menu&gt;
  </code></pre>
  
  <p>If I add the attribute on Page_Init <code>_mainMenu.Attributes.Add("onclick", "javascript:jsFunction();")</code> I get onclick event only on a table that describes the menu not on each MenuItem that are links to other pages.</p>