Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ERROR: Name 'ConfigurationManager' is not declared

ERROR: Name 'ConfigurationManager' is not declared

Scheduled Pinned Locked Moved ASP.NET
helpcsharpdatabaseworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Faisal Khatri
    wrote on last edited by
    #1

    Hello everyone, I am using VB.NET 2005 and creating a code file in which i have declared a method of connecting to the Databse. In order to implement that I am getting my Database connection string value from web.config defined like this. In the code file I am using ConfigurationManager.ConnectionString("MySqlConn").ToString(), but its giving me error "Name 'ConfigurationManager' is not declared". I have already included System.Configuration namespace at the top. but it continously giving me error. Please guys/gals help me..its urgent.. KHATRI

    S 1 Reply Last reply
    0
    • F Faisal Khatri

      Hello everyone, I am using VB.NET 2005 and creating a code file in which i have declared a method of connecting to the Databse. In order to implement that I am getting my Database connection string value from web.config defined like this. In the code file I am using ConfigurationManager.ConnectionString("MySqlConn").ToString(), but its giving me error "Name 'ConfigurationManager' is not declared". I have already included System.Configuration namespace at the top. but it continously giving me error. Please guys/gals help me..its urgent.. KHATRI

      S Offline
      S Offline
      szukuro
      wrote on last edited by
      #2

      You also have to add a reference to the System.Configuration assembly. In 1.1 this namespace existed in the System assembly, but in 2.0 new classes like ConfigurationManager reside in this new one.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups