• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

Get menu item name

how to get name of menu item ?(c#.net)
0
haithinh81
Asked:
haithinh81
1 Solution
 
Fahad MukhtarDistinguished EngineerCommented:
where do u want to get this name? in what event?
0
 
vb_jonasCommented:
Perhaps this if you are in an menuitem_click - event:

(sender as MenuItem).Name

change MenuItem to ToolStripMenuItem if you have a toolstripmenu.

(sender as ToolStripMenuItem).Name

change .Name to .Text if you like to have the menu text.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now