In ASP.Net 1.1, we used to use the Web.Config file to store the connectionstrings in the AppSettings section, then we referred to each setting in code like this:
Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings(“MyDBConnection”))
Now, with ASP.net 2.0, there’s a new ConnectionStrings section. To refer to a setting there, now, it’s a little different:
Dim myConnection As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings(“YourConnStringName”).ConnectionString)