Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instanciating an object from a Classlib What am I missin
Message
De
20/01/2006 17:19:31
 
 
À
20/01/2006 16:43:47
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01089052
Message ID:
01089073
Vues:
19
It looks to me like you're missing the name of the assembly WebStoreData is in. After adding a reference you probably want to add an imports on the assembly name.


>>>I have created a Class Project which has been sucessfully tested in a Winforms project. Now I want to use this Class in a ASP WebForm project. In the Solution explorer I added a reference to the DLL and in the CodeBehind VB file I tried to instanciate the object as I did in WinForms. However the class reference is no in Intellesence and if I type it in the reference is flagged as an error. Here is a snippet of my code behind.
>>>
>>>
>>>
>>>Partial Class _Default
>>>    Inherits System.Web.UI.Page
>>>
>>>    Dim nSearchId As Integer = -1
>>>    Dim owsdata As New WebStoreData  (class name flagged as error)
>>>
>>>
>>>    Public Sub New()
>>>
>>>    End Sub
>>>End Class
>>>
>>
>>When I have this issue, I do one compile so the environment knows about the recently added reference. The compile will not work because of this but it will refresh it. Does that help?
>
>Thanks Michael but that didn't work. I commented out the "as new..." line and ran a compile. I then removed the comment and the error was flagged again.
>
>Glenn

(On an infant's shirt): Already smarter than Bush
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform