469,313 Members | 2,536 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,313 developers. It's quick & easy.

Exporting question

I'm attempting to export data from a datagrid. I'm successful at exporting it in xls, doc, html types - but csv and pdf are giving me a headache.

The code I'm using isn't anything fancy:

Response.ContentType="application/pdf";
Response.AddHeader("content-disposition","fileattachment;filename=whatever.pdf ");
Response.Write(oStringWriter.ToString());
Response.End();
break;

I can save the pdf when prompted - but when I try to open it, it says it's corrupt or not a real pdf. Same code above for XML as well, but that just makes an xml file of my entire aspx webpage..not the actual data from my datagrid.

Any suggestions on pdf and xml exporting from datagrids?

Thanks in advance.
Oct 10 '06 #1
1 1289
scripto
143 100+
read all of this thread - it may help

http://forums.devx.com/showthread.php?t=143454
Oct 10 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by chetan | last post: by
1 post views Thread by Jacky11 | last post: by
2 posts views Thread by Yaseen D M | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.