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 閱讀(184) 評論(0)  編輯  收藏

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


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 留坝县| 永昌县| 仁化县| 西城区| 永年县| 驻马店市| 海阳市| 林芝县| 南昌市| 黑水县| 高阳县| 嵊泗县| 滕州市| 屏边| 奎屯市| 西乌珠穆沁旗| 舞钢市| 拜城县| 石河子市| 乐清市| 平湖市| 宁河县| 延边| 罗城| 刚察县| 桂平市| 浦北县| 阿城市| 朔州市| 汉中市| 曲阜市| 于都县| 大埔区| 象山县| 古蔺县| 隆德县| 文水县| 进贤县| 双牌县| 榆中县| 玛纳斯县|