Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2003, 04:26 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do i create an instance of an active x object

I created an active x control in VB...No problem...exposed the properties and methods i need...again no problem. Here is the issue i am facing. I am having trouble is asp exposing the properties and methods. After i create the object with CLASSID i get errors that tell me object required even though the control does show itself properly on the page.



Any help would be greatly appreciated....thanks in advance




RICH
 
Old July 9th, 2003, 06:11 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

How do you instantiate the component? Are you talking about a server side ActiveX DLL, or client side?

At the server, this should work:

Code:
Dim MyObject
Set MyObject = Server.CreateObject("MyProjectName.MyClassName")

Response.Write("A property: " & MyObject.MyProperty)

MyObject.MyMethod()
If this doesn't help, please be more precise about your environment (client vs server) and code.

Cheers,


Imar



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Instance and Object in # Manoj Bisht C# 9 August 26th, 2008 09:22 AM
Object Reference not set to an instance of object srinivas_chakka ASP.NET 1.0 and 1.1 Professional 0 February 8th, 2006 11:56 AM
How to create a class instance dynamic??? ffbalota C# 0 September 21st, 2003 04:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.