user310291
user310291

Reputation: 38190

The type or namespace name 'UI' cannot be found for using System.Web.UI

I am following the tut here http://msdn.microsoft.com/en-us/library/h59db326.aspx

#

Create an App_Code directory directly under the root directory of your Web site (also called Web application root). #

Copy the source file for the control (WelcomeLabel.cs or WelcomeLabel.vb) to the App_Code directory.

But I got the error on

using System.Web.UI;
using System.Web.UI.WebControl;

I have tried to add System.Web as Reference but that still doesn't resolve the stuff. I can't see System.Web.UI and System.Web.UI.WebControl in the reference lists is this normal ?

Thanks.

Upvotes: 0

Views: 2696

Answers (1)

Colin
Colin

Reputation: 759

What you can do is check if the System.Web reference is in your references folder. This can be done by looking into the references folder inside your project. (Projectname**References**)

The reference System.Web has to be there. Note: If it's not inside the reference folder, then you have to add it. (Right mouseclick on the References folder, select Add Reference..., tab .Net and select System.Web)

Now you can use all the namespaces of System.Web.

Upvotes: 3

Related Questions