title: How to pass command argument while selecting a Menu Item in System.Web.UI.WebControls.Menu
body: <p>I have a Menu. When user clicks on the menu , I need to pass a command argument. How is that done ?</p>
  
  <p>This is the code for</p>
  
  <pre><code>&lt;asp:Menu ID="NoticeManagerMenu" runat="server" Orientation="Horizontal" OnMenuItemClick="NoticeManagerMenu_MenuItemClick"&gt;
              &lt;StaticMenuStyle HorizontalPadding="0px" VerticalPadding="0px" /&gt;
              &lt;StaticMenuItemStyle BackColor="#C0C0FF" /&gt;
              &lt;StaticSelectedStyle BackColor="#C0C0FF" BorderColor="#C0C0FF" /&gt;
              &lt;StaticHoverStyle BackColor="Silver" /&gt;
              &lt;Items&gt;
                  &lt;asp:MenuItem  Text="List"&gt;&lt;/asp:MenuItem&gt;
                  &lt;asp:MenuItem Text="Insert"&gt;&lt;/asp:MenuItem&gt;
              &lt;/Items&gt;
  &lt;/asp:Menu&gt;
  </code></pre>
  
  <p>In the code behind, I wish to use like this</p>
  
  <pre><code>protected void NoticeManagerMenu_MenuItemClick(object sender, MenuEventArgs e)
      {
          if (e.CommandArgument.Equals("Update"))
          {
  
  
          }
          else
          {
  
          }           
      }
  </code></pre>
  
  <p>Thanks in Advance..</p>