Connection String for database which exists in asp.net Project: 

If you have your database (.mdf) in App_Data Folder then it will work fine.

<connectionStrings>
  <add name="ConnectionName"
    connectionString="Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|DatabaseName.mdf;
Integrated Security=True;
User Instance=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>

Please visit to our YouTube Channel for .net and othe tech tutorial Thanks

No comments:

Post a Comment