ASP. NET tricks & tip: About tooltip (title)
We know that there are at least two ways to wrap the title of a common HTML element:
1. Write the title text Branch
<A href = "#" Title = "Hello
World "> Hello World </a>
2. Insert line feed characters
<A href = "#" Title = "Hello & 10; World"> Hello World </a>
Or
<A href = "#" Title = "Hello & 13; World"> Hello World </a>
10 and 13 are the acii decimal values of the linefeed and carriage return respectively.
If you need to set the title (actually the tooltip attribute) for webcontrol,
Instead, you only need to insert the built-in line breaks in the programming language, such as C # insert \ n
<Asp: hyperlink id = "hyperlink1" runat = "server"> hyperlink </ASP: hyperlink>
Hyperlink1.tooltip = "Hello \ nworld ";
If you still enter & 10; or & 13; Asp.net, & is automatically encoded as & amp ;.
This is just a little trick. If you don't pay attention to it, you won't be able to figure out the effect for the last half of the day. It should be & #10; or & #13 ;.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/21aspnet/archive/2007/03/22/1537004.aspx