Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Web
Expertise: Beginner
Oct 25, 1999

Using <OBJECT> tag Instead of Server.CreateObject()

When you create an object in ASP using the Server.CreateObject() method, the object is created as soon as the method is called. Any threads, memory, or other resources are allocated at the point of instantiation, or creation and thus the resources are held from that point onwards. However, you can create the object in such a way that it is not actually created until the first method or property of the new object is referenced. You can do this using the HTML <OBJECT> tag with the Runat=Server attribute. The syntax for creating an object using the <OBJECT> tag is:
 
<OBJECT Runat=Sever ID=MyLink ProgID="MSWC.MyLink">
</OBJECT>
This may not seem like a lot of savings. Still, while designing a system that has to withstand a high number of hits per day, it can be a consideration to keep in mind.
Jai Bardhan
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date