ASP object creation skills

Source: Internet
Author: User

Title: (<OBJECT> vs. Server. CreateObject ())
Http:// Id = 4
Translation: Pine

When we use server components to create objects, there are generally two methods. The common method is to use the CreateObject () method of the SERVER object, as shown in the following code:
SET NextLink = Server. CreateObject ("MSWC. NextLink ")
This method is easy to use, but there is another way to save system resources. When you create an object using the Server. CreateObject () method, the object is immediately loaded and the system allocates memory and other resources for the object.
The second method to create an OBJECT is to use the HTML <OBJECT> tag. The syntax is as follows:
<OBJECT Runat = Sever ID = NextLink ProgID = "MSWC. NextLink"> </OBJECT>

When you use the <OBJECT> tag to create an OBJECT, the OBJECT you want to create will not be loaded immediately, but will not be loaded until the method or attribute of this OBJECT is referenced for the first time. In this way, we will save some resources. Although not many, it is very helpful to save server resources when your system receives nearly one million clicks every day.

Related Article

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: 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.