473,386 Members | 1,764 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,386 software developers and data experts.

type is not defined

I am relatively new to advanced concepts in
OOP, though I am fairly comfortable working
in .Net. Have recently taken a 1.1 project
into VS2005, and came across a show-stopper
of an error. When I create a variable of
another page's class type, the class is no
longer available, as I get the error "Type
'userControl' is not defined".

In other words, I have a page
displayRecs.aspx, and a user control
subRecords.ascx. In the main page, I need to
dim a variable as type subRecords; it worked
fine in 1.1, but in 2.0, I get the error. I
assume the compilation model requires
separate assemblies for each page, so the
classes aren't available until runtime. But
it seems like this could be a real hindrance
for many developers, and I image a workaround
must exist. Anybody know of one? Is this a
bug to be fixed, or a permanent change in .Net?

Lew
May 26 '06 #1
1 1298
"Lew Burrus" <ve****@virginia.edu> a écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...

|I am relatively new to advanced concepts in
| OOP, though I am fairly comfortable working
| in .Net. Have recently taken a 1.1 project
| into VS2005, and came across a show-stopper
| of an error. When I create a variable of
| another page's class type, the class is no
| longer available, as I get the error "Type
| 'userControl' is not defined".

C# is a case sensitive language. UserControl is the name of a class,
userControl may be the name of a variable, but not a class.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Jun 21 '06 #2

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

Similar topics

4
by: Jari Kujansuu | last post by:
I can successfully parse XML document using SAX or DOM and I can also validate XML document against schema. Problem is that my program should deal with user-defined schemas which means that when...
1
by: Suresh | last post by:
Hi, I have an C# CSEXE.exe (CSexe.cs) and a CSDll.dll (CSdll.cs). exe is compiled with a reference to dll. Calling for the class Type defined in CSDLL.dll using Type.GetType(...
6
by: hercules | last post by:
Hi: In some code , I used typedef unsigned char BOOL; /*boolean */ But in other code , I must use typedef unsigned int BOOL; /* boolean */ How to remove the previous typedef ? ...
3
by: phil | last post by:
I recently tried converting my asp.net 1.1 app to 2.0 in visual studio 2005 beta 2. I get several "type xxx is not defined" errors. It seems that some of my code file within my web application...
1
by: Sophie Yang | last post by:
Is it possible to use a user-defined composite type as the data type of a column? for example, create table tbl ( a integer, b type1 ); type1 is a composite type defined separately using...
6
by: Serkan DIRIARIN | last post by:
hi! i have created a document class. I have a .net client application and a web service. Both of them using same object model and referencing a doctypes.dll file. But when i want to run a client...
8
by: PJ | last post by:
How can I get a reference to the master page class? It is defined as a partial class, but I cannot seem to type a variable to the name of the partial class? The compiler continually shows "The...
9
by: Brett Romero | last post by:
Say I have a library (A.dll) with a method that accepts a collection of a specific type. The type is defined in B.dll. In A.dll, I need to loop through this collection and reference fields of...
7
by: Bill Davy | last post by:
I want to be able to write (const char*)v where v is an item of type Class::ToolTypeT where ToolTypeT is an enumeration and I've tried everything that looks sensible. There's an ugly solution, but...
6
by: p4willi | last post by:
I've defined two arrays in a Module called PubVars Public Type LinesRec CORRECT As Integer QUESTION As String PROC As Integer PAY As Integer End Type Public Lines_Array() As...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.