S
Shapper
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
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