473,322 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 2586
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works...
1
by: TY | last post by:
Any tips on exporting my existing Q&A 4(DOS) to access 2002. I have the following options in Q&A, DIF Standard ASCII Fixed ASCII dBase II " III " IV Paradox 2.0/3.0
6
by: Kevin Humphreys | last post by:
Hi There, I am trying to export a recordset to an excel file using the Content Type below in the header. Response.ContentType = "application/vnd.ms-excel" Which works fine however the...
3
by: David P. Donahue | last post by:
I'm re-writing an application in C# that was originally written in Delphi 7. The heart of the application is a DataSet displayed in a DataGrid. One of the main functions of the previous...
4
by: Tom | last post by:
I have a gridview on all of my web pages in my web app and they all export to excel. I have one page where the gridview is binding to a datatable that i created and only the first column is...
0
by: =?Utf-8?B?ZGVuIDIwMDU=?= | last post by:
hi, I trying to export data display on a gridview that supports any language (like chinese, japanese, thai, french) shown here is chinese only. There is no problem exporting english language...
0
by: gujarsachin2001 | last post by:
Hi Friends, I am expeorting data from gridview to excel data is exporting fine .But saving file or cancling saving file when I am coming back to my web page it gets hanged ......... So can any...
0
by: feltra | last post by:
Hi all, 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...
0
by: Dan | last post by:
Hi, i have some problem with exporting data from sql server to some formats. Excel and Word are not a problem, but .txt and .csv do not work properly: - with .txt, the data are shown (correctly)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.