ASP create objects of two methods comparison _ Application techniques

Source: Internet
Author: User
First, ASP to create the skills of the object

When we use the server component to create an object,
There are generally two methods. The more common approach is to use the CreateObject () method of the server object, like this:
SET Nextlink = Server.CreateObject ("MSWC. Nextlink ")

This approach works well, but there is a way to save system resources.

When you create an object with the Server.CreateObject () method, the object is immediately loaded, and the system allocates memory and other resources to the object.

The second way to create an object is to take advantage of the HTML < OBJECT > tag, which is the syntax:
< OBJECT runat=sever Id=nextlink progid= "MSWC. Nextlink "></object >

When you create an object with the < OBJECT > tag, the object you are creating is not loaded immediately, but until the object's methods or properties are referenced for the first time. In this way, we will save some resources. It's not much, but it helps save server resources when your system has to endure nearly million clicks a day.

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.