你这是 win form 还是 web form ?如这个控件 id 为 richTextBox1,web form
在后台:
string str = richTextBox1.Value;
str = str.Replace("\r\n","<br>");win form
string str = richTextBox1.Text;
str = str.Replace("\r\n","<br>");
在后台:
string str = richTextBox1.Value;
str = str.Replace("\r\n","<br>");win form
string str = richTextBox1.Text;
str = str.Replace("\r\n","<br>");
{
if( e.KeyCode == Keys.Enter )
{
粘贴<br>
}
}
赞同这种方法!