Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Server Object HTMLEncode Method

The HTMLEncode method applies HTML encoding to a specified string.

Syntax: ASP Server Object HTMLEncode Method

Server.HTMLEncode( string )

Parameters: ASP Server Object HTMLEncode Method

string

Specifies the string to encode.

Examples: ASP Server Object HTMLEncode Method

The following script:

<% Server.HTMLEncode("The paragraph tag <P>" %>

produces the following output:

The paragraph tag &lt;P&gt;

The preceding text will be displayed on a Web browser as:

The paragraph tag <P>

You can view the source to see the encoded HTML.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.