-------------------------------------------------
Title: (<OBJECT> vs. Server. CreateObject ())
Http://www.asp101.com/tips/index.asp? 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.