So you have following connection string to the Northwind database in your Web.config and you want to connect to the database in the code behind instead using query builder.
<connectionStrings>
<add name="NorthwindConnectionString" connectionString="Data Source=(local);
Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.
SqlClient"/></connectionStrings>
Here is how you would do it
1. Get the connection from the Web.config file programmatically, you can look at this
blog to find out how perform this step by step. But here is the code to get the connection string from the Web.config file
string connectString = WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].
ConnectionString;