I can't figure out what is wrong with this code. The error is
A field initializer cannot reference the non-static field, method, or property 'clsKitInfo.connectionstring'
this code sits in a class file named clsKitInfo. The problem is this line
protected SqlConnection cn = new SqlConnection(connectionstring);
protected string connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["SQLConnect"].ConnectionString;protected clsconnect cnstr = new clsconnect();protected SqlConnection cn = new SqlConnection(connectionstring);