HTML encoding method?

M

matt

hello,

i need to do some HTML encoding on some strings. not UrlEncoding, mind
you, but HTML encoding. ie:

"&" to "&"
"<" to "&lt;"

....etc. does anyone know of a good way to do this, other than manual
string replacements? what of decoding back into plain text?


thanks,
matt
 
M

matt

HttpServerUtility.HtmlEncode() is what you're looking for. Here's MS
documentation on it:

ah sweet, thanks.
I just googled [.NET + HTMLEncode] and got over 200,000 links on this... the
above is just one of them

....i had tried some other keyword variations, didnt come up w/ the
MSDN result; but sure enough thats the documentation i needed.


thanks
matt
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top