如何将用户的输入从文本框写入asp.net / html中的web.config文件?

时间:2012-02-20 20:36:39

标签: asp.net html vb.net web-config

我正在尝试获取用户手动在网页上输入的文件路径,然后将其写入web.config文件。

1 个答案:

答案 0 :(得分:1)

这是打开web.config配置文件以进行修改的方法。

System.Configuration.Configuration rootWebConfig1 = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("yourwebconfigpath");
//Do whatever you need to do
rootWebConfig1.Save();

通过:msdn