Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have created a class in Web Matrix and I'm trying to call it from a .aspx page. Here is the code for the class...

 

 

Imports System

Namespace sqlClass

Public Class sql

Public Sub New()

 

End Sub

End Class

End Namespace

 

I get the following error when I try to declare an instance of this class in my .aspx page ...

 

Compiler Error Message: BC30002: Type 'sql' is not defined.

 

Source Error:

 

Line 6:

Line 7: Sub Button1_Click(sender As Object, e As EventArgs)

Line 8: Dim sqlVB as New sql()

Line 9:

Line 10: End Sub

 

I have also tried adding a import namespace as well as removing the Namespace code from the class.

 

 

Does anyone have any suggestions as to why this error is occurring.

 

Thanks

Posted

Thanks for the response

 

I was able to compile the .vb file into a dll file. But of course I'm not sure what to do next. I try adding the dll to the classes tab in Web Matrix but that didn't seem to work.

 

Any suggestions

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...