I have an ASP.NET Label. I want to开发者_如何学Go display a message after hovering the mouse over the label.
How can I do that?
You can use the tooltip attribute of the asp label.
<asp:Label id="label1" ToolTip="Text on mouse over" runat="server">My label</asp:Label>
I'm not sure about how to do it specifically with a label, but see if you can use the abbr tag. This will display some text but will display different text when hovered over.
You can set the Tooltip attribute like so:
<asp:Label ToolTip="A nice tooltip!" runat="server">Something</asp:Label>
Go to the properties of the icon/label. And there you can find "ToolTipText". write the name on the message you want to display when mouse gets hover on it).
精彩评论