Page.RequestMoneyAsNumber Method

The RequestMoneyAsNumber method retrieves a value from a URL query string or form post variable and converts it to a number in the base monetary units of the specified or default locale.

Syntax

Page.RequestMoneyAsNumber(Name, Default, LowMoney, HighMoney, 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.
LowMoney
Optional. A monetary value that specifies the low end of the range against which to validate the converted value.
HighMoney
Optional. A monetary 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, RequestMoneyAsNumber 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. The HighMoney argument is the upper limit of a Long variable. Using this value as the upper limit and zero (0) as the lower limit of the range check ensures that the value is not negative:

list_price = mscsPage.RequestMoneyAsNumber("list_price", 0, 0, 2147483647)

Related Topics


© 1997-1998 Microsoft Corporation. All rights reserved.