multiLine TextBox 多行文本框的换行内容 在Label上换行显示

string strText = this.TextBox1.Text.Trim().Replace(System.Environment.NewLine, "<br>");

this.Label1.Text = strText;

this.TextBox2.Text = strText.Replace("<br>",System.Environment.NewLine);


//str = str.Replace("'", "''").Replace(">", "&gt;").Replace("<", "&lt;").Replace("and", "").Replace("exe", "");

posted on 2009-03-02 18:28  freeliver54  阅读(2202)  评论(0编辑  收藏  举报

导航