Encodes a string to be displayed in a browser.
BOTH HttpServerUtility and HttpUtility expose an HtmlEncode() methodthe difference is that HttpUtility is the only class that exposes it as a STATIC method.HttpServerUtility exposes it as a non-static method. You can grab an instance of HttpServerUtility from HttpContext.Current.Server in a web context.