Visual studio missing namespace classes/objects?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dimension

    Visual studio missing namespace classes/objects?

    Hi,
    in visual studio 2005 beta, when i type "using System.Web." no code complete
    helper pops up. Similarly, when typing "using System.Net." i do not see an
    HttpWebRequest in the list that pops up. According to the documentation,
    HttpWebRequest should be a part of the System.Web namespace.
    I am not sure why this is happening? Can anyone assist?


  • Nishith Pathak

    #2
    RE: Visual studio missing namespace classes/objects?

    Hi,

    Reason u don't got the HttpWebRequest with the using keyword is becoz
    HttpWebRequest is a class and not namespace. You use using keyword to import
    the namespaces and not the classes

    regards
    Nishith

    "dimension" wrote:
    [color=blue]
    > Hi,
    > in visual studio 2005 beta, when i type "using System.Web." no code complete
    > helper pops up. Similarly, when typing "using System.Net." i do not see an
    > HttpWebRequest in the list that pops up. According to the documentation,
    > HttpWebRequest should be a part of the System.Web namespace.
    > I am not sure why this is happening? Can anyone assist?
    >
    >[/color]

    Comment

    • VladimirVV

      #3
      Re: Visual studio missing namespace classes/objects?

      dimension <dimension@disc ussions.microso ft.com> wrote in message news:<D4890249-8F7C-4A88-A31A-62EB8851F9BC@mi crosoft.com>...[color=blue]
      > Hi,
      > in visual studio 2005 beta, when i type "using System.Web." no code complete
      > helper pops up. Similarly, when typing "using System.Net." i do not see an
      > HttpWebRequest in the list that pops up. According to the documentation,
      > HttpWebRequest should be a part of the System.Web namespace.
      > I am not sure why this is happening? Can anyone assist?[/color]

      I don't have VS 2005, but possible, it's not the problem of VS 2005 at
      all.
      The same "problems" in VS 2003, so I can try to explain from VS 2003
      point of view:
      1) HttpWebRequest is the class, not the Namespace => why it should be
      shown in list, when you type "using System.Net."? In this pop up only
      context meaning info is shown.
      Just try to type in any your method System.Net.=> you will see
      HttpWebRequest and many other classes too
      2) "using System.Web." "doesn't not work"... Let's have a look at
      documentation about System.Web Namespace => you will see a list of
      classes. Click on any of class of this namespace => you will see the
      help about class, scroll to the buttom and have a look at Assembly
      info:
      Assembly: System.Web (in System.Web.dll)
      It means, that you should add reference to this assembly, before using
      this namespace.
      Adding reference is easy:
      - in Solution Explorer open the project's folder
      - right click on Reference folder and choose Add Reference
      - just add in .NET page the System.Web.dll to your references
      now you can try "using System.Web." works.

      Best regards, Vladimir.

      Comment

      Working...