how to get menu content id on mouse hover in c#?

I am working on a project. I want to get main menu content and sub content id or text or title. I am using user control for this menu and applied this on master page.
Is there any possibilities to get the same as above?

If yes please reply soon.
This question may be repeated.

You can set your button (or any other GUI element) to have “GUIContent” when you create it in OnGUI(). In one of my projects I have this:

if(GUILayout.Button (new GUIContent(, string.Format("Name: {0}

Cost: {1}
{2}", po.Name, po.Cost, po.Description)))

And then later on I pull the information for a tooltip style menu item:

GUI.Label(new Rect(Input.mousePosition.x + 15, Screen.height - Input.mousePosition.y, 200, 100), GUI.tooltip);

While this may not be exactly what you want, you can store whatever information you like in there. It may not be the most elegant solution but you could store an ID, name and value in the tooltip like so:

if(GUILayout.Button(new GUIContent("1|start|false")))

and then later on get that information and split it using the character ‘|’ like so:

string[] info = GUI.Tooltip.Split('|');

and from there convert it to whatever type you want.