This may be a simple question to answer, but I'm struggling to solve.
I have a Web.config with the following values in my web application.
<appSettings> <add key ="FirstName" value ="Prasad"/> <add key ="LastName" value ="Kanaparthi"/> </appSettings>
I have an App.config with the following value in my class library (Say Lib).
<appSettings> <add key ="FullName" value ="Prasad Kanaparthi"/> </appSettings>
The class library (Lib) is a pluggable component, I added the Class Library (Lib) link in my web application.
I have the code below in my class library (Lib). When I create an instance for GetAppSettings in my web application, I can see the answers below.
namespace Lib { public class GetAppSettings { public GetAppSettings() { var FirstName = ConfigurationManager.AppSettings["FirstName"];
Question: how can I read FullName from App.config , which is a class library (Lib).
Note Since my Lib is a plugin, users can change their own FullName . I cannot combine values in Web.confing with App.config .
source share