数据库中char(13)+char(10)转换为页面的换行

protected void gvList_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
      if (e.Row.RowType == DataControlRowType.DataRow)
           e.Row.Cells[3].Text = e.Row.Cells[3].Text.Replace("\r\n", "<br>");

}

你可能感兴趣的:(char)