Previous in Contents Next in Contents

Page.RequestNumber Method

The RequestNumber method retrieves a value from a URL query string or form post variable and converts it to a number based on the specified or default locale.

Optionally, RequestNumber checks the converted number against the specified range, and validates it based on the specified locale.

Syntax

Page.RequestNumber( Name, Default, LowNumber, HighNumber, Locale)

Parameters

Name
The name of the URL query string or form post variable to retrieve.
Default
Optional. The value to return if the requested URL query string or form post variable is not present or contains no value. If this parameter is not supplied, the method returns Null in this case.
LowNumber
Optional. A number value that specifies the low end of the range against which to validate the converted value.
HighNumber
Optional. A number value that specifies the high end of the range against which to validate the converted value.
Locale
Optional. A number that specifies the locale to use to convert Name. If this parameter is not used, RequestNumber uses the value of the DataFunctions object's Locale property.

Example

In the following example, the value of a field on the purchase form (filled out by the customer) is read into the variable cc_expmonth. Because the Default parameter is specified as null, RequestNumber will return Null if the field is empty or missing, or if the month typed in the field is outside of the range of 1 to 12:

cc_expmonth = page.RequestNumber("_cc_expmonth", null, 1, 12)

Related Topics


© 1997-2000 Microsoft Corporation. All rights reserved.