locked
Menu item control RRS feed

  • Question

  • User-1299170188 posted
    Hi, I am using a menu item control in my asp.net page with menus that I create dynamically. I need to get the text of the currently clicked menu on the click event of the menu item control. Please let me know if this is possible and how I can do it.
    Friday, September 26, 2008 3:33 AM

Answers

  • User-425639139 posted

     on the ItemClick Event of Menu you can access  the Clicked Menu Item Text like following where mnuTest is the name of ASP.net Menu Control you can access e.Item.Text.ToString():

    protected void mnuTest_MenuItemClick(object sender, MenuEventArgs e)
        {
            Response.Write(e.Item.Text.ToString());
        }

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 26, 2008 5:36 AM

All replies

  • User-425639139 posted

     on the ItemClick Event of Menu you can access  the Clicked Menu Item Text like following where mnuTest is the name of ASP.net Menu Control you can access e.Item.Text.ToString():

    protected void mnuTest_MenuItemClick(object sender, MenuEventArgs e)
        {
            Response.Write(e.Item.Text.ToString());
        }

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 26, 2008 5:36 AM
  • User-1299170188 posted
    thanks
    Friday, September 26, 2008 6:26 AM