Get menu item name

how to get name of menu item ?(c#.net)
haithinh81Asked:
Who is Participating?
 
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
 
Fahad MukhtarDistinguished EngineerCommented:
where do u want to get this name? in what event?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.