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.comwww.prenia.comWeblog: blogs.prenia.com/cathi