如何读取web.config中的连接字符串设置
这里是我的样本代码
string connect= ConfigurationSettings.AppSettings["myconnection"];
SqlConnection sqlConn = new SqlConnection(connect);
sqlConn.Open();
SqlCommand cmd = sqlConn.CreateCommand();
{C}
但它不工作正在使用。net2.o和sqlserver2008
我无法读取连接字符串,上面的语法,我得到一个空字符串