Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

ASP HTMLEncode Method


❮ 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>

❮ Complete Server Object Reference