Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

Need to stream and zip a .CSV file to the clients browser!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Smith - 30 Aug 2007 14:34 GMT
Hello,

I need to stream data from a "DataTable" to the client's machine. The data
first need to be converted to .CSV , and ziped before streaming it to the
client.

Does anyone has any experience with this? Any code snippet will be very
welcome.

Many thanks in advance

Cheers
Niels Ull - 30 Aug 2007 15:03 GMT
> Hello,
>
> I need to stream data from a "DataTable" to the client's machine. The
> data first need to be converted to .CSV , and ziped before streaming
> it to the client.

Rendering to CSV is pretty staright-forward.
How important is it to zip it? Must the user download datafile.zip containing
data.csv ?

If it's "just" for performance of transferring a large amount of data, it
might be a
lot easier to apply http compression which all modern browsers support.

Just set the metabase attribute DoDynamicCompression for your GenerateCSV.aspx
page -
more details on msdn.

> Does anyone has any experience with this? Any code snippet will be
> very welcome.
>
> Many thanks in advance
>
> Cheers
Smith - 30 Aug 2007 15:17 GMT
> > Hello,

> > I need to stream data from a "DataTable" to the client's machine. The

> > data first need to be converted to .CSV , and ziped before streaming

> > it to the client.

> Rendering to CSV is pretty staright-forward.

> How important is it to zip it? Must the user download datafile.zip
> containing

> data.csv ?

Yes

> If it's "just" for performance of transferring a large amount of data, it

> might be a

> lot easier to apply http compression which all modern browsers support.

This sounds very interesting. Yes the problem here is performance. The file
could be more then gigabyte. Is HTTP compression losseless?

Do I get the same order of compression as with zip? How is the file
uncompressed on the client side?

> Just set the metabase attribute DoDynamicCompression for your
> GenerateCSV.aspx

> page -

> more details on msdn.

> > Does anyone has any experience with this? Any code snippet will be

> > very welcome.

> > Many thanks in advance

> > Cheers

Many thanks

S
Smith - 30 Aug 2007 15:17 GMT
> > Hello,

> > I need to stream data from a "DataTable" to the client's machine. The

> > data first need to be converted to .CSV , and ziped before streaming

> > it to the client.

> Rendering to CSV is pretty staright-forward.

> How important is it to zip it? Must the user download datafile.zip
> containing

> data.csv ?

Yes

> If it's "just" for performance of transferring a large amount of data, it

> might be a

> lot easier to apply http compression which all modern browsers support.

This sounds very interesting. Yes the problem here is performance. The file
could be more then gigabyte. Is HTTP compression losseless?

Do I get the same order of compression as with zip? How is the file
uncompressed on the client side?

> Just set the metabase attribute DoDynamicCompression for your
> GenerateCSV.aspx

> page -

> more details on msdn.

> > Does anyone has any experience with this? Any code snippet will be

> > very welcome.

> > Many thanks in advance

> > Cheers

Many thanks

S
Michael Nemtsev - 30 Aug 2007 15:20 GMT
Hello Smith,

I'd like just add a note to Neils post, that there is http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx 
a good description how to set the gzip compression on the IIS

WBR,
Michael  Nemtsev [.NET MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

> Hello,
>
[quoted text clipped - 8 lines]
>
> Cheers
John Mott - 30 Aug 2007 20:42 GMT
Hi Smith,

Here is a sample app that does precisely that.

http://www.nicecleanexample.com/ViewApp.aspx?TID=aspdotnet_csv

HTH

John

> Hello,
>
[quoted text clipped - 8 lines]
>
> Cheers

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.