C # setting tooltip for <asp: Label> or <asp: Literal>
2 answers
Use the WebControl.ToolTip property to set the tooltip for the label management tool.
Label1.ToolTip = "Your text as tooltip";
+12
I recommend not using WebControls, but I recommend using HtmlControls as they provide a more direct view of the generated HTML output.
, asp:Literal WebControl, , WebControls, , ToolTip.
ToolTip HTML title="", . Literal, , title="tip text goes here".
HtmlControls, Attributes, :
HtmlControl div = new HtmlGenericControl("div");
div.Attributes["title"] = "tooltip text here";
+11