Previous in Contents Next in Contents

Page.SURL Method

The SURL method generates a properly formatted Secure HTTP URL based on the provided file name and an optional list of name/value arguments. The formatted URL includes the server name (copied from the site dictionary's SecureHostName value), the virtual directory in which the file is stored (taken from the context in which the Web site is running), and the name of the file itself .

Additionally, if the StandardSManager for the application is initialized in URL mode, the SURL method uses the value stored in the MSCSSIDUrlKey Application object variable as the name in a name/value pair, the value of which is the current customer's shopper ID.

Syntax

Page.SURL(Filename, Arguments)

Parameters

Filename
The name of the file for the SURL to reference.
Arguments
An optional list of arguments that identify the name/value pairs to be appended to the SURL.

Remarks

During application development, you can set the Site.DisableHTTPS property to one (1), which causes the SURL method to use the NonsecureHostName value as the host name. The SURL method generates a secure URL only if Site.DisableHTTPS is set to zero (0).

Example

The following example is from Clocktower's Purchase.asp file:

<FORM METHOD="POST"
   ACTION="<% = mscsPage.SURL("xt_orderform_purchase.asp") %>">

Assuming that the host name is www.microsoft.com, and assuming that security is not disabled, the preceding example produces the following URL (note that the protocol is specified as HTTPS):

https://www.microsoft.com/clocktower/xt_orderform_purchase.asp

Related Topics


© 1997-2000 Microsoft Corporation. All rights reserved.