473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Type not Defined. Going crazy!

Hello,

On an ASP.NET 3.5 web site App_Code folder I have a class named
BoxesView under the namespace Engine.

On an aspx page code behind I have the following:

Protected WithEvents c As New Engine.BoxesView

Then I added it to the page. BoxesView inherits composite control.

I don't get any error when I write my code. However when I build the
web site I sometimes get the following error:

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

Sometimes the page runs fine sometimes I get the error.

I don't make any changes ... I have no idea why this is happening!

I am on this for 2 hours.

Why does my page either runs or display an error?

And why I don't get any error in my code but only when sometimes when
I run my page or build the web site?

I am using VS 2008.

Thanks,

Miguel
Jun 27 '08 #1
1 843
Miguel,
It can be very tricky to work with the VS Web Site Projects. I always use
the Web Application Project for exactly this reason since it all compiles
into a single DLL instead of many dlls. Make sure that you are also
importing the namespace correctly for your class that is coming from the
App_Code folder.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"shapper" <md*****@gmail.comwrote in message
news:d5**********************************@m36g2000 hse.googlegroups.com...
Hello,

On an ASP.NET 3.5 web site App_Code folder I have a class named
BoxesView under the namespace Engine.

On an aspx page code behind I have the following:

Protected WithEvents c As New Engine.BoxesView

Then I added it to the page. BoxesView inherits composite control.

I don't get any error when I write my code. However when I build the
web site I sometimes get the following error:

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

Sometimes the page runs fine sometimes I get the error.

I don't make any changes ... I have no idea why this is happening!

I am on this for 2 hours.

Why does my page either runs or display an error?

And why I don't get any error in my code but only when sometimes when
I run my page or build the web site?

I am using VS 2008.

Thanks,

Miguel
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing/modifying the code. Thank you. .. Facundo
13
by: dawatson833 | last post by:
I have several stored procedures with parameters that are defined with user defined data types. The time it takes to run the procedures can take 10 - 50 seconds depending on the procedure. If I...
3
by: Laurel | last post by:
this is driving me crazy. i need to use a form control as a criteria in a select query, and the control's value is set depending upon what a user selects in an option group on the form. the query...
2
by: Armond VanHeusen | last post by:
A quick question if I may (this relates to .NET1.1 by the way): If I have a C# class defined in my project that does operator overloading, can I use this in my VB code? For example, I have a...
2
by: leo2100 | last post by:
Hi, I need help with this program. The program is supposed to take a text file and identify the words in it, then it should print them and count how many times a word is repeated. At first main...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
7
by: Sky | last post by:
I have been looking for a more powerful version of GetType(string) that will find the Type no matter what, and will work even if only supplied "{TypeName}", not the full "{TypeName},{AssemblyName}"...
1
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems...
2
by: Dsperry101 via AccessMonster.com | last post by:
Hello, I have been working with visual basic for a while but this is something I have never understood. I have some code in a VB6 application that sends email using Winsock and works great. I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.