All libraries in the AppDomain have access to the web.config data through the ConfigurationManager class (using System.Configuration)
So in a class library,
string connString = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
Use this way in order to access the connection string.