MCSD Preparation Q&A

<configuration>
  <connectionStrings>
    <add name="MyConnectionString" 
        connectionString="Data Source=.\SQLSERVER2008;
        Initial Catalog=dbName;
        User ID=sa;
        Password=sqladmin@123"
        providerName="System.Data.SqlClient" />
  </connectionStrings>
</configuration>
using System.Web.Configuration;

String connectionString = WebConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;