Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2009, 10:14 AM
Authorized User
 
Join Date: Mar 2009
Posts: 64
Thanks: 0
Thanked 1 Time in 1 Post
Default Output streams

Imar,

I'd appreciate a pointer in the right direction.

I do not believe that this topic is in your book, but I have used your excellent book to do lot of my work.

My web site is gathering data and assembling strings in a List<String>. I have formatted these Strings in a .csv format. Since I cannot write this as a file to the machine of the user, i.e., the person accessing the web site, I cannot figure out what I need to either create a file and offer it to the user for download or how to stream the Strings in the List to the user for her to save it or not as she wishes.

Would you be so kind as to tell me where to look, including what Wrox books may cover this topic?

Thanks.

Thomas
 
Old September 30th, 2009, 04:52 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can stream the content using Response.WriteFile, as explained here:

http://www.xefteri.com/articles/show.cfm?id=8

Instead of Response.WriteFile to write a file, you can also use Response.Write to write a string. As shown in this example, you need to set the content type to force the Save As dialog, and you can use AddHeader to determine the client file name.

For more examples: http://www.google.com/search?hl=en&q...T&aq=f&oq=&aqi=

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Streams in C# pady123 C# 2 September 11th, 2007 10:17 AM
I/O streams: keyboard input kanoorani Java Basics 2 April 20th, 2007 01:58 AM
Play audio streams directly from a winsock port AshBex Pro VB.NET 2002/2003 2 April 8th, 2005 12:22 AM
XML, Sockets, Streams and a headache owain General .NET 4 September 8th, 2004 04:53 AM
recording live streams using java udayagiri suresh babu Java GUI 2 August 8th, 2004 06:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.