标签:连接 host add setting local provider ons nec client
1. <connectionStrings>
<add name="mysql" connectionString="localhost"
providerName="System.Data.SqlClient" />
</connectionStrings>
string s = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["mysql"].ToString();
2. <appSettings>
<add key="mongodb" value="MongoDB:localhost" />
</appSettings>
string s = System.Configuration.ConfigurationManager.AppSettings["mongodb"].ToString();
标签:连接 host add setting local provider ons nec client
原文地址:http://www.cnblogs.com/mayyan/p/7810635.html