perlynsparks
perlynsparks

Reputation: 401

Error: the type or namespace UI doesnt exist in the namespace

I need to use System.Web.UI in a class library project.

using System.Web.UI;

namespace OnlinePdViewer
{
    public class DisplayPd
    {
    }
}

I get compile error when using System.Web.UI statement:

"The type or namespace name 'UI' does not exist in the namespace in the 'System.Web' are you missing an assembly reference?"

I tried to add the reference System.Web, but COM does not include System.Web dll.

Upvotes: 11

Views: 30419

Answers (1)

perlynsparks
perlynsparks

Reputation: 401

  1. Select the 'Project' menu option
  2. Select 'Add Reference'
  3. Select 'Framework'
  4. Find and check the checkbox next to the 'System.Web' DLL and select OK.

The error will be removed.

Upvotes: 22

Related Questions