<connectionStrings>
<add name="sqlconstr"
providerName="System.Data.Sql"
connectionString=
"Data Source=./SQLEXPRESS;AttachDbFilename=|DataDirectory|db.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True;"/>
</connectionStrings>
web.config中|DataDirectory|会被自动解析到App_Data。
app.comfig中|DataDirectory|会被自动解析到Bin目录下