THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

ASP HTMLEncode Method


Server Object Reference Complete Server Object Reference

The HTMLEncode method applies HTML encoding to a specified string.

Syntax

Server.HTMLEncode(string)

Parameter Description
string Required. The string to encode

Example

The following script:

<%
response.write(Server.HTMLEncode("The image tag: <img>"))
%>

Output:

The image tag: &lt;img&gt;

Web browser output:

The image tag: <img>

Server Object Reference Complete Server Object Reference