第一步:将aspx页面标签清空。只剩下page声明即可。如下图
第二步:准备xml格式数据,
第三步:在cs文件pageload方法里写
if (!IsPostBack){
Response.ContentType = "text/xml";Response.Charset = "utf-8";Response.Write(str_xml);
}
第四步:浏览即可。