469,927 Members | 1,983 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Exporting GridView data to Multiple File Formats

Hi,

The following is from my friend who has only restricted net access
from his office and hence cannot post....

--------------------------------------------------------------------------------------------------
I am trying to export a GridView data to multiple file formats. The
requirement is that when more than one file format is selected and the
"Submit" button is clicked, the data from the grid needs to get
exported to multiple file formats. First of all is it possible? I am
using ASP.NET 2.0 and VS 2005. If possible can you give me any hints
as to how to go about it? Thank you.

Right now I am using the Response.ContentType method to export to the
specified file format. I just change the extension to the file type
that is required (for e.g. For xml, I give .xml and for html I
give .html). I am using a HTMLTextWriter to perform this operation. I
am rendering the GridView control to export the data.

I have been successful to export it to a single file format at one
time. But it does not work when multiple selections are made. Even
then I am able to export in only one format. Can you please help me..?
Thank you.

---------------------------------------------------------------------------------------------

Thanks & Regards,
-feltra

Jul 19 '07 #1
1 2389
HTTP = 1 Request to 1 Response. If the client browser launches child browser
windows, each can display a file.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"feltra" <fe****@gmail.comwrote in message
news:11********************@e16g2000pri.googlegrou ps.com...
Hi,

The following is from my friend who has only restricted net access
from his office and hence cannot post....

--------------------------------------------------------------------------------------------------
I am trying to export a GridView data to multiple file formats. The
requirement is that when more than one file format is selected and the
"Submit" button is clicked, the data from the grid needs to get
exported to multiple file formats. First of all is it possible? I am
using ASP.NET 2.0 and VS 2005. If possible can you give me any hints
as to how to go about it? Thank you.

Right now I am using the Response.ContentType method to export to the
specified file format. I just change the extension to the file type
that is required (for e.g. For xml, I give .xml and for html I
give .html). I am using a HTMLTextWriter to perform this operation. I
am rendering the GridView control to export the data.

I have been successful to export it to a single file format at one
time. But it does not work when multiple selections are made. Even
then I am able to export in only one format. Can you please help me..?
Thank you.

---------------------------------------------------------------------------------------------

Thanks & Regards,
-feltra

Jul 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by TY | last post: by
6 posts views Thread by Kevin Humphreys | last post: by
3 posts views Thread by David P. Donahue | last post: by
4 posts views Thread by Tom | last post: by
reply views Thread by =?Utf-8?B?ZGVuIDIwMDU=?= | last post: by
reply views Thread by gujarsachin2001 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.