- 关 键 词:
Send DataSet as xml file.
// Create MemeoryStream
System.IO.MemoryStream ms = new System.IO.MemoryStream();
// Write MemeoryStream
MyDataset.WriteXml(ms,System.Data.XmlWriteMode.IgnoreSchema);
Response.Clear();
// filename & attachment
Response.AddHeader("Content-Disposition", "attachment; filename=Acounts.xml");
// size of the file,to show process of downloading
Response.AddHeader("Content-Length", ms.Length.ToString());
// mode:download
Response.ContentType = "application/octet-stream";
// sending to client
byte[] b = ms.ToArray();
Response.OutputStream.Write(b,0,b.Length);
Response.End();
}
巧 巧 读 书:http://www.qqread.com/xml/h341250.html相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- XML详解 (1550篇文章)
- XML基础教程 (852次浏览)
- XML简介 (714次浏览)
- 如何读取XML文件内容 (561次浏览)
- XML与面向Web的数据挖掘技术 (544次浏览)
- 了解 XML实现通用的数据访问 (482次浏览)
- XML入门精解之文件格式定义(DTD) (376次浏览)
- XML的简单读取与写入 (339次浏览)
- DOM的结构 (329次浏览)
- XML入门之11问答 (323次浏览)
- XMLHTTP资料 (289次浏览)



