public static List<string> ReadAppSettings()
{
List<string> list = new List<string>();
ConnectionStringSettingsCollection connections =
ConfigurationManager.ConnectionStrings;
if (connections.Count != 0)
{
Console.WriteLine();
Console.WriteLine("Using ConnectionStrings property.");
Console.WriteLine("Connection strings:");
foreach (ConnectionStringSettings connection in
connections)
{
list.Add(connection.Name);
}
return list;
}
else
{
Console.WriteLine();
Console.WriteLine("No connection string is defined.");
Console.WriteLine();
}
}
Use this list as datasource to your combobox.
After selecting a value from combobox, get Value for Selected DB key.