开发者

Reference to configuration manager via httpcontext

How can i get r开发者_如何学Goeference to the configuration manager via httpcontext?

Thanks


As pointed out by Adam, use:

System.Configuration.ConfigurationManager

It doesn't matter if it is in a class in a separate project. When you call the code from your web project, the ConfigurationManager will logic will be applied to your web app, not the containing project.


simply: System.Configuration.ConfigurationManager.AppSettings[""] (of course with a using stmt up top for System.Configuration - and make sure your library has a ref to system.configuration)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜