保存web.config文件(转载)

string appSetting = txtAppSetting.Text;//appSetting子节点值

string connectionString = txtConnectionString.Text;//连接字符串

string key = txtKey.Text;//appSetting子节点Key

string connectionName = txtConnectionName.Text;//连接Name

ConfigurationOperator op = new ConfigurationOperator(); 
op.SetAppSetting(key, appSetting); 
op.SetConnectionString(connectionName, connectionString); 
op.Save();

本篇文章来源于:开发学院 http://edu.codepub.com  

原文链接:http://edu.codepub.com/2010/0803/24812_8.php

posted @ 2011-04-05 16:59  郑文亮  阅读(286)  评论(0编辑  收藏  举报