发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
private void UpdateConfig(string KeyName, string Xvalue)
{
XmlDocument doc = new XmlDocument();
string sPath = Server.MapPath("web.config");
doc.Load(sPath);
XmlNode node = doc.SelectSingleNode(@"//add[@key='" + KeyName + "']");
XmlElement ele = (XmlElement)node;
ele.SetAttribute("value", Xvalue);
doc.Save(sPath);
}
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。