c#中连接数据库的两种方法
方法一:
string myConn = System.Configuration.ConfigurationManager.ConnectionStrings
["sqlConnectionString"].ConnectionString;
方法二:
string connString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings
["sqlConnectionString"].ToString();