[thelist] ASP.NET: Using a Custom Class

Tab Alleman talleman at Lumpsum.com
Thu Jul 20 16:33:07 CDT 2006


I'm guessing it would be:

Dim objSM As csSendMail
objSM.func1(var1, var2)



> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Casey Crookston
> Sent: Thursday, July 20, 2006 4:46 PM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] ASP.NET: Using a Custom Class
> 
> 
> Thanks!  Any idea how this would be in VB?
> 
> 
> -----Original Message-----
> 
> You want something like this:
> 
>       csSendMail objSM;
>       objSM.func1(var1, var2);
> 
> -----Original message-----
> From: "Casey Crookston" caseyc at IntelliSoftmn.com
> 
> > Hi,
> > 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. 
> 
> 
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 



More information about the thelist mailing list