从数据集下载xml [英] Download xml from dataset
问题描述
大家好,
我想使用数据集对象连接到Microsoft sql服务器数据库,然后将其制成XML文件并发送以进行下载.
我是怎么做到的? (我知道如何使用数据集对象连接到数据库,我想知道的是如何发送创建要下载的XML文件).
我不需要将XML文件保存在服务器上,只需发送即可下载.
我用C#编写.
感谢您的帮助,也感谢我的英语.
Hey all,
I want to connect to a microsoft sql server database with dataset object and then make it a XML file and send it to download.
How did I do that? (I know how to connect to a database with dataset object, what I would like to know is how I send the XML file that I created to download).
I don''t need to save the XML file on the server, just send it to download.
I write in C #.
Thanks about your help and sorry about my English.
推荐答案
如果您没有看到此主题,请看一下.它可能会对您有所帮助.
http://forums.asp.net/t/316315. aspx/1?create + xml + file + from + a + dataset [
If you have not seen this thread,please have a look.It may help you.
http://forums.asp.net/t/316315.aspx/1?create+xml+file+from+a+dataset[^]
亲爱的首次读取线程.已经提到了:
Dear first read thread carefully. there is already mentioned :
Response.ContentType = "text/xml";
并将响应直接发送到客户端.应该可以的.
您是否尝试过该代码?
谢谢
And response directly sending to the client side. It should be work.
Have you try that code?
Thanks
我知道如何创建XML文件.
我的问题是如何发送XML文件进行下载..
I know how to create the XML file.
My question is how to send the XML file to download..
这篇关于从数据集下载xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!