Why System.Web.UI not seem by VS compiler?

R

Randall Parker

For this line:

using System.Web.UI;

when building in Visual Studio 2003 I'm getting this error:

The type or namespace name 'UI' does not exist in the class or namespace 'SystemWeb'
(are you missing an assembly reference?)

What is an assembly reference?

I'm new to VS 2003 and C# I created a C# project, not as ASP.NET project. But I'm
just messing around trying to include various things into a C# class to see how they
work.
 
R

Richard Blewett [DevelopMentor]

Randall Parker said:
For this line:

using System.Web.UI;

when building in Visual Studio 2003 I'm getting this error:

The type or namespace name 'UI' does not exist in the class or namespace
'SystemWeb' (are you missing an assembly reference?)

What is an assembly reference?

I'm new to VS 2003 and C# I created a C# project, not as ASP.NET project.
But I'm just messing around trying to include various things into a C#
class to see how they work.

If you look at your project in the Solution Explorer you will see a
References folder. Right click on this add select Add Reference. You then
need to add a reference to System.Web.

But what is this actually doing? Well youo are using types that are not in
your assembly - somehow the compiler needs to both check that the methods
that you are using on those types exist and set up thet fact that you are
dependent on the on the assembly with those types in in the assemblies
manifest. The reference allows both of these things

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top