日期:2014-05-18  浏览次数:20360 次

如何让<TD>LabelText</TD>中的Label字符自动换行?
<table   border= "1 "   width= "500pt "   bgcolor= "#94C8EB "   cellpadding= "0 "   cellspacing= "0 ">
                <col   width=10%   />
                <col   width=90%   />
                <tr>
                <td   style= "width:   14% "> 内容: </td>
                <td>
                        <asp:Label   ID= "LabelText "   runat= "server "> </asp:Label> </td>
                </tr>
                </table>

如何让LabelText中的字符很多时,自动换行呢?
我这里怎么无论Label中的字数有多少(就算是10000个),都是一行显示!!汗!

------解决方案--------------------


<td style= "word-break:break-all ">
<asp:Label ID= "LabelText " runat= "server "> </asp:Label> </td>
------解决方案--------------------
可以加入回车换行符
------解决方案--------------------
可以写个方法CutString截断字符串显示为aaa...然后鼠标上去就提示全部内容

-------------------------------------------
MSN:bdbox@hotmail.com
请给我与您交流的机会