ASP HTMLEncode Attribute

Server Object Reference Manual

Definition and Usage

The HTMLEncode method applies HTML encoding to a specified string.

syntax

Server.HTMLEncode(string)
parameters description
string Required. The string to be encoded.

Example

Script:

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

Output:

The image tag: <img>

Browser Output:

The image tag: <img>

Server Object Reference Manual