Connecting database to webconfig.file in asp.net
We have to take webconfigfile and give the connection strings as follows
<add name="ConnectionString" connectionString="Data Source=MUKUL-PC\SQLEXPRESS;database=mydatbase;Integrated Security=true;"/>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
In the above code we have connnection strings in the webconfig.file, we have to give the data-source and database name , which we have given in the sqlserver.