By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,384 Members | 714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,384 IT Pros & Developers. It's quick & easy.

Replacing HTML charcters with entity equivalents

P: n/a
Hi,
Is anyone aware of a built-in method to substitute HTML or XML reserved
characters with their escaped equivalents?
If I have the String "If X < Y then hello" I have to substitute the '<' in
order to encode it into a serialized XML string.
What is the 'correct' way in .NET?

Cheers,
iGadget
Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
HttpUtility.HtmlEncode()

At least on web services and the like.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"iGadget" <iG******@hotmail.com> wrote in message
news:1f*******************************@40tude.net. ..
Hi,
Is anyone aware of a built-in method to substitute HTML or XML reserved
characters with their escaped equivalents?
If I have the String "If X < Y then hello" I have to substitute the '<' in
order to encode it into a serialized XML string.
What is the 'correct' way in .NET?

Cheers,
iGadget

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.