Hi expert,
I am now doing a test using my home PC cos I am so used to doing things via entity framework I really forgot how to write the connection string inside my web.config.
My database name is test.
And here's how I do it inside my web.config:
- <connectionStrings>
- <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-WebApplication9-20170128051949.mdf;Initial Catalog=aspnet-WebApplication9-20170128051949;Integrated Security=True"
- providerName="System.Data.SqlClient" />
- <add name="ConnTest" connectionString="Data Source=localhost;Initial Catalog=test;Integrated Security=True;" providerName="System.Data.SqlClient" />
- </connectionStrings>
Hope someone can tell me if it is correct or how can I ascertain that it is connected ?
Tks.