The HTMLEncode method applies HTML encoding to a specified string. This is useful as a quick method of encoding form data and other client request data before using it in your Web application. Encoding data converts potentially unsafe characters to their HTML-encoded equivalent.
If the string to be encoded is not DBCS, HTMLEncode converts characters as follows:
- The less-than character (<) is converted to <.
- The greater-than character (>) is converted to >.
- The ampersand character (&) is converted to &.
- The double-quote character (") is converted to ".
- Any ASCII code character whose code is greater-than or equal to 0x80 is converted to &#
, where is the ASCII character value.
0 comments:
Post a Comment