FOLLOW US
softpcapps Software CODE HELP BLOG

Shareware and free Open Source Windows Software Applications and free Online Tools

How to HTML Encode a String

To HTML encode a string do the following :

 
		string html_encoded_string = HttpUtility.HtmlEncode(text_to_encode);

Please note that you have to also add "using System.Web;" on the top and also add a reference to the System.Web library.

Download Demo Project

Encode Decode Demo Project