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

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


          網站導航:
          博客園   IT新聞   Chat2DB   C++博客   博問  
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 甘南县| 陇川县| 刚察县| 桂平市| 谷城县| 天柱县| 阿克陶县| 潮安县| 班戈县| 昌图县| 台前县| 乐安县| 平原县| 陆丰市| 紫阳县| 尼勒克县| 眉山市| 重庆市| 保靖县| 广河县| 郸城县| 临安市| 乐亭县| 肃南| 濮阳市| 客服| 黄龙县| 武冈市| 鸡泽县| 潜江市| 嘉黎县| 芮城县| 堆龙德庆县| 西峡县| 合水县| 皮山县| 洛浦县| 鄂温| 乳源| 新疆| 荆门市|