1、设置Web.config
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<connectionStrings>
<add name="TestConnStr1" connectionString="user id=hgjg@sa;password=jhyrf765_67;Data Source=localhost;Initial Catalog=DB1;" providerName="System.Data.SqlClient" />
<add name="TestConnStr2" connectionString="user id=hgjg@sa;password=jhyrf765_67;Data Source=localhost;Initial Catalog=DB2;" providerName&#