DataGrid doesn't do HTML entity encoding.

C

Chris Mumford

I have a DataGrid bound to a table where one of the strings is "<Unknown>".
When this is sent out via the DataGrid control as HTML it is not encoded and
therefore it looks like a tag in the HTML stream. What I would expect is
"&lt;Unknown&gt;". Does anybody know how to make this happen?
 
E

Elton Wang

You can use

String.Replace("<","&lt;").Replace(">","&gt;")

HTH

Elton Wang
(e-mail address removed)
 

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,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top