System.Web Namespace HttpServerUtility Class
Creates a server instance of a COM object identified by the object's Programmatic Identifier ( ProgID ).
[ VB ]
Overloads Public Function CreateObject ( _
ByVal progID As String _
) As Object
[ C# ]
public object CreateObject (
string progID
);
[ C++ ]
public: Object* CreateObject (
String* progID
);
[ JScript ]
public function CreateObject (
progID : String
) : Object;
- progID
- The class or type of object to be instantiated.
The new object.
Exception Type |
Condition |
HttpException |
Occurs when the object could not be instantiated. |
The following example creates an object using the object's ProgID.
[ VB ]
Dim myObject As Object
myObject = Server.CreateObject ( "Acme.Component.3" )
[ C# ]
Object myObject;
myObject = Server.CreateObject ( "Acme.Component.3" );
HttpServerUtility Members HttpServerUtility.CreateObject Overload List