Export (0) Print
Expand All

HttpServerUtility.CreateObject Method

Creates a server instance of a COM object.

Overload List

Creates a server instance of a COM object identified by the object's Programmatic Identifier (ProgID).

[Visual Basic] Overloads Public Function CreateObject(String) As Object
[C#] public object CreateObject(string);
[C++] public: Object* CreateObject(String*);
[JScript] public function CreateObject(String) : Object;

Creates a server instance of a COM object identified by the object's type.

[Visual Basic] Overloads Public Function CreateObject(Type) As Object
[C#] public object CreateObject(Type);
[C++] public: Object* CreateObject(Type*);
[JScript] public function CreateObject(Type) : Object;

Example

The following example creates an object using the object's ProgID.

[Visual Basic] 
Dim MyObject As Object
MyObject = Server.CreateObject("Acme.Component.3")
   

[C#] 
Object MyObject;
MyObject = Server.CreateObject("Acme.Component.3");
   

[C++] 
Object* MyObject;
MyObject = Server->CreateObject(S"Acme.Component.3");
   

[JScript] 
var myObject : Object
myObject = Server.CreateObject("Acme.Component.3")
   

See Also

HttpServerUtility Class | HttpServerUtility Members | System.Web Namespace

Show:
© 2014 Microsoft