1.web.config中的配置
<ConnectionString>
<add name="ConnectionString" ConnectionString="server=.;database=zx;uid=sa;pwd=123456";>
</ConnectionString>
2.获取ConnectionString
首先进行引用System.Configuration