日期:2014-05-18 浏览次数:20444 次
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using System.IO;
using System.Text;
public partial class Ajax_check_etao :PowerEasy.SiteFactory.Web.UI.BasePage
{
public XmlTextWriter XmlResponseWriter;
protected void Page_Load(object sender, EventArgs e)
{
base.Response.Clear();
base.Response.Buffer = true;
base.Response.Charset = "utf-8";
base.Response.AddHeader("contenttype", "text/xml");
base.Response.ContentEncoding = Encoding.GetEncoding("utf-8");
base.Response.ContentType = "text/xml";
XmlTextWriter writer = new XmlTextWriter(HttpContext.Current.Response.OutputStream, Encoding.UTF8);
writer.Formatting = Formatting.Indented;
writer.Indentation = 4;
this.XmlResponseWriter = writer;
this.XmlResponseWriter.WriteStartDocument();
this.XmlResponseWriter.WriteStartElement("root", "");
XmlTextWriter XmlResponseWriter = new XmlTextWriter(HttpContext.Current.Response.OutputStream, Encoding.UTF8);
if (Session["etao_name"] == null || Session["etao_name"].ToString()=="")
{
this.XmlResponseWriter.WriteElementString("status", "no");
}
else
{
this.XmlResponseWriter.WriteElementString("status", "yes");
this.XmlResponseWriter.WriteElementString("username", Session["etao_name"].ToString());
}
this.XmlResponseWriter.WriteEndElement();
this.XmlResponseWriter.WriteEndDocument();
this.XmlResponseWriter.Close();
base.Response.End();
return;
}
}