Click here to Skip to main content
15,883,796 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In vs2o12 when trying this line of code

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Configuration;
using System.Data;
using System.Data.SqlClient;



C#
string connString = ConfigurationManager.ConnectionStrings["MyConnectionStringName"].ConnectionString;



Iam getting the error
[The name "ConfigurationManager" does not exist in current context.......??]
.

Could anyone please help?
Posted
Comments
King Fisher 11-Oct-14 1:16am    
Common Error .Google it :)
Namith Krishnan E 14-Oct-14 2:34am    
is ur class file and web.config in the same project?

Use Google often, to find links like : http://stackoverflow.com/a/1836938[^]
 
Share this answer
 
Hello

You need a reference to System.Configuration
 
Share this answer
 
Comments
Sooraj_Singh 10-Oct-14 9:50am    
Iam already "using System.Configuration";
Reference...
King Fisher 11-Oct-14 1:14am    
there is using System.Configuration.
 
Share this answer
 
v2
Comments
King Fisher 11-Oct-14 1:16am    
Solution 2=Solution3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900