XmlDocument xdc = new XmlDocument();
            xdc.Load(Server.MapPath("Web.config"));
               XmlNode root = xdc.SelectSingleNode("configuration/appSettings/add");
            XmlElement xe = root as XmlElement;
            xe.SetAttribute("value","server=.;database=pubs;user id=sa;password=");
             xe.InnerText="tesstadd";
             xdc.Save(Server.MapPath("Web.config"));
            Response.Write(xe.GetAttribute("key")); 

           

              Dim xdc As XmlDocument = New XmlDocument
                  xdc.Load(Request.PhysicalApplicationPath + ("web.xml"))
                  Dim xn As XmlNode = xdc.SelectSingleNode("root/config/pc")
                  Dim xe As XmlElement = CType(xn, XmlElement)
                  xe.GetAttribute("name")
                  xe.GetAttribute("ip")
                  xe.GetAttribute("open")
                  Dim ip As String = xe.GetAttribute("ip")
                  Dim open As String = xe.GetAttribute("open")
                  If open = "yes" Then
                  Else
                      Response.Redirect(Request.Url.ToString())
                  End If


          文章來源:http://www.cnblogs.com/wangdetian168/archive/2008/06/25/1229996.html
          posted on 2010-09-28 11:00 sanmao 閱讀(186) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 汉寿县| 桐城市| 抚顺县| 荃湾区| 仙居县| 松桃| 日喀则市| 独山县| 嘉鱼县| 大邑县| 琼中| 张家港市| 镇远县| 岑巩县| 临夏县| 曲阳县| 太康县| 丹江口市| 长白| 屯昌县| 石棉县| 招远市| 东辽县| 台东市| 加查县| 兖州市| 抚顺县| 始兴县| 敦化市| 重庆市| 明光市| 太白县| 溧水县| 墨脱县| 延庆县| 天台县| 德安县| 绥宁县| 茂名市| 遂宁市| 错那县|