string bulletinContent = this.Server.HtmlEncode(txtcontent.Text.ToString().Replace("'", "")).Replace("\r\n", "<br/>").Replace(" ", " ");
将有换行文字的字符串显示在TextBox中,原来是换行的,在TextBox中显示的也是换行的:
txtcontent.Text = board.BulletinContent.Replace("<br/>","\r\n");