试验了两个方法
1、引用using System.Configuration;
string s1=ConfigurationManager.ConnectionStrings["sqlConnectionString"].ConnectionString;
2、引用using System.Web.Configuration;
string s2=WebConfigurationManager.ConnectionStrings["sqlConnectionString"].ToString();