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 admins_admin : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.infobind();
        }
    }
    protected void infobind()
    { 
                string url = Server.MapPath("~/info.xml");
            StreamReader readfile = new StreamReader(url, System.Text.Encoding.GetEncoding("gb2312"));
            XmlDocument xdoc = new XmlDocument();
            xdoc.Load(readfile);
            XmlNode Email = xdoc.SelectSingleNode("myinfo/email");
            this.mail.Text = Email.InnerText;
            XmlNode xqq = xdoc.SelectSingleNode("myinfo/qq");
            this.qq.Text = xqq.InnerText;
            XmlNode xmsg = xdoc.SelectSingleNode("myinfo/meg");
            this.task.Text = xmsg.InnerText;
            XmlNode xhelp = xdoc.SelectSingleNode("myinfo/help");
            this.help.Text = xhelp.InnerText;
            readfile.Close();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string url = Server.MapPath("~/info.xml");
        XmlDocument xdoc = new XmlDocument();
        xdoc.Load(url);
        XmlNode Email = xdoc.SelectSingleNode("myinfo/email");
        Email.InnerText = this.mail.Text;
        XmlNode xqq = xdoc.SelectSingleNode("myinfo/qq");
        xqq.InnerText = this.qq.Text;
        XmlNode xmsg = xdoc.SelectSingleNode("myinfo/meg");
        xmsg.InnerText = this.task.Text;
        XmlNode xhelp = xdoc.SelectSingleNode("myinfo/help");
        xhelp.InnerText = this.help.Text;
        xdoc.Save(url);
        this.infobind();
    }
}
//51as/px