Html Encoding is basically converting Html tags in non Html tags so that they can be
embeded into a html code.
string html_string = "<b>Hello world!</b>";
Response.Write(html_string);
Output:- Hello world! string htmlEncoded = Server.HtmlEncode(html_string);
Response.Write(htmlEncoded);
Output:- <b>Hello world!</b>