The name 'ConfigurationManager' does not exist in the current context

I have encountered this several times, and it irritates me each time.  Sometimes I remember it sometimes I do not.  Not sure why you have to go and manually add the System.Configurations to the References as well as adding the using statement for it. 

http://stackoverflow.com/questions/1274852/the-name-configurationmanager-does-not-exist-in-the-current-context

Oh and this is one case where vb.net is easier than c# (one of the few).  C# syntax would be ConfigurationManager.ConnectionStrings["dsn"].ConnectionString;, while vb.net syntax would for example be ConfigurationManager.AppSettings("dsn").

Comments

Popular posts from this blog

Asp.net Publishing Broke Site - "App_WebReferences is not allowed because the application is precompiled"

Telerik - Custom Group Footers In RadGrid