Fully Resolve server objects

Source: Internet
Author: User
Tags error code range

The server object provides methods and properties that are accessed on the server. Most of the methods and properties are provided as functionality of the utility.

Grammar:

Server.property|method

Properties (property)

The Server object has only one property: The maximum time a scripttimeout program can run

Method (Methods)

CreateObject establishes an object instance.

Execute executes an ASP file

GetLastError returns an error code

HTMLEncode converts the specified HTML code.

MapPath converts a relative path to an absolute path.

Transfer sends all current status information to another ASP file

UrlEncode converts the specified code, including spaces, as a URL

Method details of the server object

CreateObject

Grammar

Server.CreateObject( progID )

Parameters

ProgID

Specifies the name of the component to be created, in the following format: [Vendor.] component[. Version].

Points:

In general, objects created by the Server.CreateObject method have a range of pages. This means that when this page's ASP program is finished, this object will automatically disappear.

To create an object that has a session or application range, you can use the Global.asa file in the

Execute

The Execute method calls an ASP file and executes it just as the ASP file for this call exists in this ASP file. This is much like a call to a class in many languages.

Grammar

Server.Execute( Path )

Parameters

Path

Specifies the path to the ASP file that is executed. If it is an absolute path, then it must be in the same place as the ASP application (directory).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.