开发者

I want to display a message on hovering the mouse on the ASP.NET label

开发者 https://www.devze.com 2022-12-24 06:31 出处:网络
I have an ASP.NET Label. I want to开发者_如何学Go display a message after hovering the mouse over the label.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消