I am having trouble finding out where and how to HTML Encode a cell's data on the Dynamic Data (v4.0) gridview of List.aspx. As a simple case, suppose I have formatted cell data that is A<br/>B in the DB. Obviously, I want A stacked on B in the cell.
It seems gridView1.HtmlEncode = true has gone away.
So maybe I'll try to catch it on the RowDataBound event:
protected void GridView1_RowDataBound(Object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
// Html Encode the cells
but this event never fires?
Has anyone figured out how to properly render HTML tags data in the List.aspx's GridView1?
If I figure this out, then I can add a MetaAttribute called something like [EncodeAsHtml(true)] and be on my way. Thanks!
View Complete Post