Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dim a class in inline html

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello all. I am currently converting classic asp to asp.net. I have one of my class modules converted, but I get an error when I try to Dim the class in the .aspx page. The error is: Type 'clsUser' is not defined.

Here's what I'm doing..

Class Module:
Public Class clsUser
...
End Class

.aspx page
dim objUser = new clsUser

Any ideas what I'm doing wrong?

Thanks!

SteveS
 
dim objUser as new clsUser

is typically how you should declare a new instance of an object (in vb.net -- that syntax looks like c#), but I would have thought that would have raised a syntax error, rather than a "class not found". Not completely sure on that one.

However, your error actually sounds more like the class has either
(a) not been compiled -or-
(b) not been added as a reference to your project prior to compiling

hth :)
paul
penny1.gif
penny1.gif
 
Thanks for that response. I'm still getting the error. The class module is within my project. It's in directory called /classes. I'm not sure how to "compile" the code, but I tried several things:
1) Debug/Start
2) Build/Build Solution
3) Build/Build <project name>

I am still getting the error message:
Compiler Error Message: BC30002: Type 'clsUser' is not defined.

I'm obviously new to vs.net and appreciate all help!

Steve

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top