Previous in Contents Next in Contents

Page.SiteRoot Property

The SiteRoot method returns the physical directory that contains the Commerce Server site.

Example

The following example is from the Product.asp file in a site generated by the Commerce Site Builder Wizard:

<IMG SRC="<%= "/" & mscsPage.SiteRoot %>/assets/product_images/
<%= mscsPage.HTMLEncode(rsProduct("image_file").value) %>"

This example uses the SiteRoot method to get the directory in which the site is located, which it then uses to form a reference to the graphic image for the product, which is then displayed on the product page. Assuming the site resides in a directory called mysite, the example resolves to the following HTML code:

<IMG SRC="/mysite/assets/product_images/product.gif"

Related Topics


© 1997-2000 Microsoft Corporation. All rights reserved.