I can not access the elements of the System.Web space

Screen from Object Browser

enter image description here

There is a lot of things, and when addressing in the code 3 elements are available:

enter image description here

Even using does not help, what could be the reason?

  • 2
    Is the System.Web.dll library connected to the project? Judging by the signs - no. - kodv
  • Exactly, however, I noticed that mscorlib is also not connected, but in the project using System.Collections.Generic there are classes of generalized collections available, how so? - BlackOverlord
  • one
    And you try to connect mscorlib and see for yourself the answer to your question;) - kodv
  • Ok, I'll try, thanks) - BlackOverlord

2 answers 2

Classes of their single namespace can be defined in different assemblies (different DLLs).

System.Web.AspNetHostingPermission and the remaining two classes from the prepress are defined in System.dll , which is connected to the default project.

The remaining classes from System.Web defined in System.Web.dll , which you need to add in the project References - select the project in Solution Explorer, right-click on References, Add Reference.

    Try

     using System.Web; using System.Web.Mail; // к примеру 

    Or if you know what you need, then write it, and the studio itself will offer what you need to add to using.