Skip to content
Related Articles

Related Articles

ASP Server CreateObject Method

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 29 Dec, 2021

The ASP Server CreateObject Method is used to create an instance of a server object. The object created by this method has page scope. These objects are destroyed when the server finished the Current ASP page. We generally use the <object>tag in Global.asa file to create an object in the Session or Application. 



Parameter Values: It Contains the value i.e progID which represents the type of object to create. The format for progID is Component. It is a required parameter. 

Example-1: Below code, used to create an Object.


Set adrot=Server.CreateObject("MSWC.AdRotator")

Example-2: Below code illustrates that we cannot create an object with the same name as the in-built Object. 


Set Application=Server.CreateObject("Application")

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!