Line feeds in a GridView

M

MSNews

Hi,

If a database field contains more than one line of text, i.e. Several
Environment.NewLine characters, the GridView cell ignores them. If I replace
the NewLine with "<br />" - the GridView helpfully converts that string to
"&lt;br %gt;" and so I don't get the CrLf - arrgh! this used to be easy, am
I missing a simple trick?

The colums are autogenerated, which works perfectly except for this problem.

Can anyone help?

TIA
 
M

MSNews

OK,

I finally managed to dig down through the smart-tag to find the HtmlEncode
property of the BoundField and set it to false. so, by replacing NewLine
with "<br />" in the database, it all works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top