@Amatya,
The connectionString section gives strongly typed access to the connection strings through the ConfigurationManager class.
To read values from Connection strings
System.Configuration.ConfigurationManager.ConnectionStrings["TestConnection"].ConnectionString;
AppSettings is meant to store general/custom settings
To read values from AppSettings
System.Configuration.ConfigurationManager.AppSettings[key]
Though we can however store the values of database connections in AppSettings, but if you observe properly, you can find out that
there is a specific element (providerName="System.Data.SqlClient") for it in connectionStrings But app settings is only key-value pair type.
Please let us know if this clears the doubt.
Thanks
--
Thanks & Regards,
RNA Team
Amatya, if this helps please login to Mark As Answer. | Alert Moderator