1,必须保证数据库文件在App_Data文件夹,
用下面的连接字符串:
<add name="connstring" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\change.mdf;Integrated Security=True;User Instance=True"/>
1,必须保证数据库文件在App_Data文件夹,
用下面的连接字符串:
<add name="connstring" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\change.mdf;Integrated Security=True;User Instance=True"/>