Reading a key from the Web.Config using ConfigurationManager

后端 未结 10 1835
情书的邮戳
情书的邮戳 2020-11-28 17:55

I am trying to read the keys from the Web.config file in a different layer than the web layer (Same solution)

Here is what I am trying:

         


        
10条回答
  •  渐次进展
    2020-11-28 18:08

    Also you can try this line to get string value from app.config file.

    var strName= ConfigurationManager.AppSettings["stringName"];
    

提交回复
热议问题