Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic Interface from asp page 1

Status
Not open for further replies.

sherlock1305

Programmer
Jul 10, 2001
21
0
0
CA
Hi,

first, sorry for my bad english, I'm from Quebec, CANADA and my first language is french!

So, my question is...I want to make a user-defined interface(I'll name this one IClass) to my original class(I'll name this one MyClass)...The question is, what's the setting for the instancing property of MyClass and IClass and when I use CreateObject in my Web Page, I use MyClass or IClass???

Thanks a lot!

Sherlock, programmer

Continuation.........


In fact, I found that instancing IClass and MyClass MultiUse is ok...and when I call my component like that...


Private Sub Command1_Click()
Dim x As MyProject.IClass
Set x = CreateObject("MyProject.MyClass")
x.Execute
End Sub


...from an EXE, it works!
But now, my question is "How to call it from my ASP page?"

Thanks a lot!

 
You should be able to simply use the createobject function again. Thats how I have used interfaces before. Sometimes, depending on the classes and interfaces the implements keyword was either used or not required.

Im pretty sure you can just use the same process as in vb

If this fails then write your code and compile it into a DLL. You can then run everything from your business layer and just call methods of it.

Hope this helps.

PS. For a french speaking person your English is good
 
Hi NevG,

I tried to use it as in vb but there is no declaration in asp pages...so I can't use

Dim x As MyProject.IClass

...and it causes a problem!
But, like u told me, I use my business layer without interface and then I call my data layer with my interface and it works!

Thanks for all,

Sherlock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top