Question Compiler Error Message: BC30002: Type 'clsNewLog' is not defined.

mcob

New member
Joined
Jan 4, 2013
Messages
1
Programming Experience
1-3
Hi All,

I am having problems invoking my class on my project.

I created a simple VB class in the App_Code folder called “clsNewLog”
I imported it into my default user form above the “Partial Class ….”
When I compile/build the code – all is well.
However, when I run the form I get the following error: ” Compiler Error Message: BC30002: Type 'clsNewLog' is not defined.”
I am using VS 2010.

Here is the code:


Imports clsNewLog <-- Class is defined in the App_Code Folder
Partial Class NewLog_Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
LoadDropDowns()
End Sub
Sub LoadDropDowns()
Dim tList As New ListItem
Dim cNewLog As New clsNewLog <-- line that fails

'***** Load the combo box
ddlMemType.Items.Add(cNewLog.gtMembraneType())


Catch ex As Exception
End Try
End Sub
End Class

Any suggestions/comments are welcome!

Best regards
Michael
 
App_Code folder is not supported for Web Application projects, code files are compiled into a single dll. Add the class to project root, or if you need more organization put it in new folder with any reasonable name.
 
Back
Top