IMSCSPage_3_0::RequestString

Ee797479.c++_off(en-US,CS.10).gifEe797479.vb_on(en-US,CS.10).gif

Use this method to retrieve a value from a URL query string or form post variable and perform string processing on it, based on the specified locale.

This processing may involve stripping out leading and trailing white spaces, stripping out carriage returns, checking the length of the string against a specified range, and validating the string based on the specified or default locale.

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

  • This method is included for backwards compatibility with Site Server 3.0 Commerce Edition. See the AppFrameWork object, which provides similar functionality to that found in this method. Using the AppFrameWork methods  is the preferred way of adding this type of functionality to your site, and will ensure better compatibility with future versions of Microsoft Commerce Server.

Definition

HRESULT IMSCSPage_3_0::RequestString(BSTRbstrName,VARIANTvtDefault,VARIANTvtMin,VARIANTvtMax,VARIANTvtStripWhite,VARIANTvtStripReturn,VARIANTvtCase,VARIANTvtLocal,VARIANT*pvtRet);

Parameters

bstrName

[in] A BSTR that contains the name of the URL-query string or form-post variable to retrieve.

vtDefault

[in, optional] A VARIANT that contains the string to return if the specified URL-query string or form-post variable does not exist or contains no value. If this parameter is not supplied, the method returns NULL.

vtMin

[in, optional] A VARIANT that contains the number that indicates the minimum length against which the length of the bstrName parameter must be validated. If the variant is of type vtMissing, the vtMin parameter value is not considered in the validation process. If this value is invalid or length of the bstrName/vtDefault parameter is not in range, the method returns NULL.

vtMax

[in, optional] A VARIANT that contains the number that indicates the maximum length against which the length of the bstrName parameter must be validated. If the variant is of type vtMissing, the vtMax parameter value is not considered in the validation process. If this value is invalid or length of the bstrName/vtDefault parameter is not in range, the method returns NULL.

vtStripWhite

[in, optional] A VARIANT that contains a Boolean value that indicates whether leading and trailing white spaces should be stripped from the string. The default value is True.

vtStripReturn

[in, optional] A VARIANT that contains a Boolean value that indicates whether carriage returns should be stripped from the string. The default value is True.

vtCase

[in, optional] A VARIANT that contains the number that indicates the case to which the string should be converted. The default value is zero (0), which results in no modification to the case of the string. If the vtCase parameter is one (1), the string is converted to uppercase. If the vtCase parameter is two (2), the string is converted to lowercase.

vtLocal

[in, optional] A VARIANT that contains the number that specifies the locale to be used as the basis of the conversion. If this value is not specified, the RequestString method uses the value of the Locale property of the DataFunctions object.

pvtRet

[out, retval] A pointer to a VARIANT used to return the processed string.

Return Values

This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

The pvtRet parameter points to valid data only if the method completed successfully.

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

See Also

Page Object

IDataFunctions_4_0::get_Locale, put_Locale


All rights reserved.