Share via


Page.Encode

Ee783628.c++_on(en-US,CS.10).gifEe783628.vb_off(en-US,CS.10).gif

Use this method to apply HTML encoding to the specified text string.

This method is identical to the HTMLEncode method, which is the preferred name for this function. The Encode method applies HTML encoding to the specified text string. Characters in the string, such as "<" and "&" that have special meanings in HTML, are converted into their HTML equivalents, such as &lt; and &amp; so that they will be displayed correctly by the client browser.

Ee783628.important(en-US,CS.10).gif Important

  • This method is included for backwards compatibility with Site Server 3.0 Commerce Edition.

Definition

Function Encode(vtValue As Variant) As String

Parameters

vtValue

A Variant that contains the text string to encode.

Return Values

If this method completes successfully, it returns a String that contains encoded HTML text.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' oPage is a Commerce.Page object
' sEncoded is a String
' vOriginal is a String Variant
sEncoded = oPage.Encode(vOriginal)

See Also

Page Object

Page.HTMLEncode


All rights reserved.