label字符自动换行(转自网络)

如何让<TD>LabelText</TD>中的Label字符自动换行?

方法:td   style= "word-break:break-all ">  <asp:Label   ID= "LabelText "   runat= "server "> </asp:Label> </td>

窗体上Label字符自动换行

方法:

在<Label></Lable>标签外侧添加<pre></pre>: <PRE><asp:Label id="lblDescription" runat="server" Width="420px"></asp:Label></PRE>

在Page_Load中添加: this.lblDescription.Style.Add("word-break", "break-all");

原文地址:https://www.cnblogs.com/enjoyprogram/p/2342495.html