using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.IO;
public partial class UserControl_setRule : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string path = Server.MapPath("../rule.xml");
            XmlDocument xmlDOC = new XmlDocument();
            xmlDOC.Load(path);
            XmlNode node = xmlDOC.SelectSingleNode("rule");
            this.FCKeditor1.Value = node.InnerText;
           
         
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string path = Server.MapPath("../rule.xml");
       
        XmlDocument xmlDOC = new XmlDocument();
        xmlDOC.Load(path);
        XmlNode node = xmlDOC.SelectSingleNode("rule");
        node.InnerText = this.FCKeditor1.Value;
        xmlDOC.Save(path);
        msgBox.putMsg("编辑成功", "getRule.aspx");
    }
}
