Just open your project in visual studio.
Under view click on server Explorer
You can see the Server tool box.
Click on "
Connect To Database
"
Choose "
Microsoft SQL Server (SqlClient)
" as Data Source
Choose or enter server name.
Choose login method from windows authentication or username and password.
Select the database name form list
Click on
Test Connection
if it is successful then click on ok.
Make right click on added database and click on properties.
Copy that connection string property.
Use this connection string in your web config.
and access it wherever you require.
check this for
how to use connection string from web.config