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

Encoding characters for HTML

P: n/a
I need to convert non-standard characters to their encoded forms for
use in an HTML page. Note that I *don't* mean converting a URI, where
e.g. spaces would become %20 - there are methods for that in the
HttpServerUtility class. I mean converting things like & to & and
the accented 'e' to é.

At a pinch, I don't mind encoding the entities numerically (like
") rather than using their descriptive names, but even so I don't
have the list of exactly which characters require encoding.

Does the .NET Framework offer a way to do this?

May 21 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Take a look at HttpUtility.HtmlEncode
I hope this helps
Galin Iliev[MCSD.NET]

May 21 '06 #2

P: n/a
Galcho[MCSD.NET] wrote:
Take a look at HttpUtility.HtmlEncode

Just the ticket. Thanks.

May 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.