在web.config定义的数据库连接怎么用在cs代码中
用控件的话可以这样
ConnectionString= " <%$ ConnectionStrings:ConnectionString %> "
那在cs代码中呢
------解决方案--------------------ConfigurationManager.AppSettings[ " "];
ConfigurationManager.ConnectionStrings[ " "];
------解决方案-------------------- string ConnectionString = System.Configuration.ConfigurationSettings.AppSettings[ "connectionString "];
------解决方案--------------------System.Configuration.ConfigurationManager.ConnectionStrings[ ".... "].ConnectionString;