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", "");

原文地址:https://www.cnblogs.com/freeliver54/p/1401714.html