Share via


Page.Check

Ee810340.c++_on(en-US,CS.10).gifEe810340.vb_off(en-US,CS.10).gif

Use this method to generate the word CHECKED into a page if the value specified in the vtCheck parameter is a nonzero value. CHECKED is a parameter to an HTML <INPUT> tag, which sets a check box or radio button to selected when the form first loads.

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

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

Definition

Function Check(vtCheck As Variant) As String

Parameters

vtCheck

A Variant that contains the expression that is evaluated to determine whether the word CHECKED should be inserted at the location on a page where the call to Check appears.

Return Values

If this method completes successfully, it returns a String that contains the string "CHECKED" or "".

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

' The following example could be used in an ASP file 
' to generate three radio buttons in an HTML form:
' oPage is a Commerce.Page object
<% my_color="Green" %>
<INPUT TYPE="RADIO" NAME="CONTROL1" VALUE="0"<% = _
    oPage.Check(my_color="Red")%>>Red
<INPUT TYPE="RADIO" NAME="CONTROL1" VALUE="1"<% = _
    oPage.Check(my_color="Green")%>>Green
<INPUT TYPE="RADIO" NAME="CONTROL1" VALUE="2"<% = _
    oPage.Check(my_color="Blue")%>>Blue
' Assuming that my_color contains "Green" this produces
' the following HTML output:
<INPUT TYPE="RADIO" NAME="CONTROL1" VALUE="0">Red
<INPUT TYPE="RADIO" NAME="CONTROL1" VALUE="1"CHECKED>Green
<INPUT TYPE="RADIO" NAME="CONTROL1" VALUE="2">Blue
' This HTML output produces three radio buttons labeled Red,
' Green, and Blue, with the Green option selected.

See Also

Page Object

Page.Option


All rights reserved.