15
foreach (string str in ConfigurationManager.AppSettings.AllKeys)
{
if (str.ToUpper().IndexOf("SOMESPECIAL") > -1) //the somespecial ones you want to add in
lstList.Add(ConfigurationManager.AppSettings[str]);
}
You'd likely be better off putting this information in a separate XML file and having a reference to that file in AppSettings. That would give you a lot more flexibility around how you retrieved the information and consumed it.
The only thing would be that you'd want to create a separate (static?) class for reading the XML in a similar fashion to the System.Configuration.ConfigurationManager.AppSettings class.
If, on the other hand, it HAD to be in your Web.Config file, I would suggest the only way to achieve this simply would be to have a [pipe/comma/semi-colon] delimited array in one "List" setting.