New line in GridView cell

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2009-01-10T21:53:37Z Indexed on 2010/04/02 3:23 UTC
Read the original article Hit count: 489

Filed under:
|
|
|

I'm binding a GridView to an LINQ query. Some of the fields in the objects created by the LINQ statement are strings, and need to contain new lines.

Apparently, GridView HTML-encodes everything in each cell, so I can't insert a <br /> to create a new line within a cell.

How do I tell GridView not to HTML encode the contents of cells?

Maybe I should use a different control instead?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET