把SQL数据库链接字符串写在web.config文件中,便于后期的修改及维护。
<connectionStrings> <add name="connStr" connectionString="server=hanbaohong\sqlexpress; database=test; uid=sa; pwd=sa123456"/> </connectionStrings>
把SQL数据库链接字符串写在web.config文件中,便于后期的修改及维护。
<connectionStrings> <add name="connStr" connectionString="server=hanbaohong\sqlexpress; database=test; uid=sa; pwd=sa123456"/> </connectionStrings>