C# Web 中,label 的换行与对齐

来源:互联网 发布:淘宝店铺免费装修模板 编辑:程序博客网 时间:2024/06/07 20:48

 左对齐:

<asp:Label ID="LB_text" runat="server" Text="Label" Width="700px" style="TEXT-ALIGN: left"  ></asp:Label>


换行:

    LB_text.Text=news_text.Text.Replace("/n", "<br>"); 



测试成功!

原创粉丝点击