[thelist] ASP.NET: Using a Custom Class

Casey Crookston caseyc at IntelliSoftmn.com
Thu Jul 20 15:09:17 CDT 2006



I've created a class file as such:



Imports ...


Namespace quickCommands

    Public Class csSendMail

        Public Function func1(ByVal var1, ByVal var2)


            Return emailText

        End Function

    End Class

End Namespace



Now, in a code behind file, I want to use func1.  So I've done this:



Imports projName.quickCommands


Public Class WebForm1

    Inherits System.Web.UI.Page


    Sub btn_click(ByVal sender As Object, ByVal e As System.EventArgs)

        csSendMail.func1(var1, var2

    End Sub


End Class



But, at csSendMail.func1, I'm being told: Reference to a non-shared
member requires an object reference


What am I missing?  How do I reference the object?  I thought
"projName.quickcommands" took care of that.


Thanks, Casey

More information about the thelist mailing list