asp.net.ph

Server.CreateObject Method ( String )

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;

Parameters

progID
The class or type of object to be instantiated.

Return Value

The new object.

Exceptions


Exception Type Condition
HttpException Occurs when the object could not be instantiated.

Example

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" );
   
See Also

HttpServerUtility Members   HttpServerUtility.CreateObject Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph