采用Gridview的OnRowDataBound属性
后台
protected void gvTranslateInfo_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowIndex>=0) { if(e.Row.RowType==DataControlRowType.DataRow) { e.Row.Cells[1].Text = "" + e.Row.Cells[1].Text.Replace("<", "<").Replace(">", ">") + ""; } } }