<connectionStrings>
<add name="SQLConnectionString1" connectionString="Data Source=(local);Initial Catalog=dbName;User ID=sa;Password=sa" providerName="System.Data.SqlClient"/>
</connectionStrings>
Global.asax
void Application_Start(object sender, EventArgs e)
{
// 在应用程序启动时运行的代码
Design.Connections.ConnectionProviderBuilder.ConnectionString = ConfigurationManager.ConnectionStrings["SQLConnectionString1"].ConnectionString;
}
this.RegisterStartupScript("", "<script language=javascript>alert('"+ msg +"')</script>");