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

Convert string to HTML

P: n/a
Is there something in .NET that will convert a string so that it can be
displayed correctly as HTML?

eg I would like to convert the string "a < b" to "a C; b".

cheers,
Paul.


Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Paul,

Try this?

Server.HtmlEncode("a < b")

Gives:

a &lt; b

Ken
MVP [ASP.NET]
"Paul Ritchie" <RE************@REMOVExtra.REMOVEco.REMOVEnz> wrote in message
news:O5**************@tk2msftngp13.phx.gbl...
Is there something in .NET that will convert a string so that it can be
displayed correctly as HTML?

eg I would like to convert the string "a < b" to "a C; b".

cheers,
Paul.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.