Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference to a non-shared member
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00794619
Message ID:
00794671
Vues:
12
Hi Loy,

In the Dim statement:
Dim oTest As TestClass = New TestClass
Change it to have an ending parenthesis like the following:
Dim oTest As TestClass = New TestClass()
>
>
><SCRIPT runat=server>
>     Sub Page_Load(o As Object, e As EventArgs)
>         Dim oTest As TestClass = New TestClass
>         oTest.SubTest
>     End Sub
>
>     Public Class TestClass
>         Public Sub SubTest
>            response.write("TEXT IN TESTCLASS")
>         End Sub
>     End Class
>
></SCRIPT>
>
>
>
>
>Using the simple script above, I want to call response.write() within the class TestClass but got an error: "Compiler Error Message: BC30469: Reference to a non-shared member requires an object reference".
>
>Any idea how to do this?
>
>Thanks
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform