获取Web.Config中节点的值
发布日期:2021-08-13 01:52:04 浏览次数:3 分类:技术文章

本文共 381 字,大约阅读时间需要 1 分钟。

读取webconfig里面的appSetting和connectionString 

1 
2
3
4

 

在页面读取: private string siteUrl = ConfigurationManager.AppSettings["SiteURL"];

  

1 
2
3
4

 

在页面读取:string strLogDBConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["LogDBConn"].ToString();

转载于:https://www.cnblogs.com/zk-zhou/p/6495788.html

转载地址:https://blog.csdn.net/weixin_30672295/article/details/96192016 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:jdk安装和环境变量配置
下一篇:Mysql之主从复制

发表评论

最新留言

感谢大佬
[***.8.128.20]2024年04月15日 11时54分33秒