Re: Very Confused: Class, Imports, ...
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Thu, 2 Jun 2005 08:27:55 -0400
Shapper,
what you need to do is compile common.vb to common.dll using the
command-line compiler (vbc.exe) and reference *that* in your VS.NET project.
vbc /t:library /out:common.dll common.vb
If you need to import .Net classes, include them in your command line:
vbc /t:library /r:system.dll /r:system.web.dll /out:common.dll common.vb
Once your assembly ( common.dll ) is compiled,
place it in the /bin directory of your application
and you will be able to call any of its functions.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:%23R6LUt2ZFHA.3864@xxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I am working in a web site where all the code is placed in aspx.vb files.
> After a while I realized that many functions included in my aspx.vb files where common
> to all pages.
>
> I created a new file named common.vb where I created a class named common and where I
> place all common functions:
>
> Imports System
>
> Public Class Common
> Public Shared Sub MyFunction01()
> ...
> End Sub
> ... End Class
>
> In my aspx.vb file I have:
>
> Imports Common
>
> Public Class myPage
>
> Inherits System.Web.UI.Page
> Private Sub Page_Load(
> MyFunction01()
> End Sub
>
> This is all I have. I get the error:
> Namespace or Type 'common' for the Imports 'common' cannot be found.
>
> Basically all I need is to use Common functions in my aspx pages class.
>
> Can someone tell me specifically what am I doing wrong?
>
> Thanks,
> Miguel
>
>
.
- Follow-Ups:
- Re: Very Confused: Class, Imports, ...
- From: Shapper
- Re: Very Confused: Class, Imports, ...
- From: Shapper
- Re: Very Confused: Class, Imports, ...
- References:
- Very Confused: Class, Imports, ...
- From: Shapper
- Very Confused: Class, Imports, ...
- Prev by Date: RE: Very Confused: Class, Imports, ...
- Next by Date: Accessing Class / Circular Reference
- Previous by thread: RE: Very Confused: Class, Imports, ...
- Next by thread: Re: Very Confused: Class, Imports, ...
- Index(es):
Relevant Pages
|