c#操作web.config
来源:互联网 发布:雨人f4软件常见问题 编辑:程序博客网 时间:2024/06/09 03:49
web.config文件
<appSettings>
<!--<add key="YZTUrl"value="http://WIN-IAOS1A1SO7O/mapsystemweb/index.aspx" />-->
<add key="YZTUrl"value="http://win-iaos1a1so7o:8171/MapSystem.Web_SQLSERVER/Default.aspx"/>
<add key="PageSize" value="10" />
<add key="DBLX" value="1"/>
<add key="XZQ" value="450700"/>
<!-- 数据库类型 1 SQL Server 2 ORACLE -->
<add key="Server"value="GTSERVERCP\GTCP2005"/>
</appSettings>
读取vs2012中,<appsetings>节点
DB_META.Value =System.Configuration.ConfigurationManager.AppSettings["DB_META"];
修改<appseting>中的值
List<XElement> addSets = (from t in xelement.Descendants("add") select t).ToList();
addSets[10].Attribute("value").Value= txtYZTUrl.Value;
web.config文件
<applicationSettings>
<DZManagerSystem.Properties.Settings>
<!--一张图的自定义服务-->
<setting name="DZManagerSystem_EditService_EditService"serializeAs="String">
<value>http://win-iaos1a1so7o:8070/CustomService_ORACLE/services/EditService.EditServiceHttpSoap11Endpoint/</value>
</setting>
</DZManagerSystem.Properties.Settings>
</applicationSettings>
读取<applicationSettings>节点
YZTCustomServeice.Value =DZManagerSystem【项目名称】.Properties.Settings.Default.Properties["DZManagerSystem_EditService_EditService"].DefaultValue.ToString();
修改<applicationSettings>节点
List<XElement> sets = (from tin xelement.Descendants("value") select t).ToList();
sets[2].Value =txtYZTCustomServeice.Value;
- c#操作web.config
- c#操作web.config/xml 文件
- C#对Web.config的读写操作
- C# 读写 Web.config
- web.config 读写操作
- C# 操作 app.config
- C#操作App.config
- C#对App.config文件或者web.config文件中节点的操作类
- 操作App.config与Web.config文件
- C# 修改Web.Config配置文件
- C# 动态修改web.config
- 操作Web.config的AppSettings
- 对web.config的操作
- 程序 操作 web.config(配置文件)
- 修改web.config的操作
- C#操作配置文件app.config
- C#操作配置文件app.config
- C# 操作配置文件 App.config
- bzoj2656: [Zjoi2012]数列(sequence)
- c# 智能设备应用程序不显示在任务栏以及最小化窗体
- 聊聊Oracle Data Recovery Advisor(DRA)(下)
- JAVA基础—关于Runtime对象
- 新手
- c#操作web.config
- shell 总结 原创-胡志广
- tag
- 安装Git 服务器
- Windows学习心得【系统菜单】
- c# 中如何获取xml文档中最后的一个节点的值
- GitHub
- merge VS rebase VS cherry-pick
- Qt富文本处理