AppSettings in App or Web Config Using a Linked File

I’m trying to reference some common config settings between a Windows Service and an ASP.NET MVC website. I am doing this by using the file attribute on appSettings in either the App.config or Web.config (respectively). The file (named common.config) that is being referenced is a linked file in a separate project in the same solution. That common.config is set to Content with Copy Always in both projects.

Get the column names of a table and store them in a string or var c# asp.net

I was wondering how I could get the columns of a database table and store each of them in a string or string array. I have the following code but I believe it does not work. I’m using the default table that is given in asp.net. I’ve been able to write to this table no problem but I cannot figure out how to select from it and save the values retrieved. here is what I have in my code behind