Hello Smith,
XSLT only complicate this, just write from DataSet to CSV directly
http://www.netomatix.com/GridExportToCSV.aspx
---
WBR,
Michael Nemtsev [.NET/C# 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
S> Hello,
S> My task is to create a .csv file using XSLT. Does anyone have some
S> experience with doing this with C# 2.0?
S> My ASP.NET 2.0 application will get a DataTable object and stream a
S> .CSV
S> file to the user. I understand, XSLT would be the smarter way of
S> doing this.
S> Any help will be highly appreciated.
S>
S> Many thanks in advance
S> Smith
Smith - 03 Sep 2007 14:03 GMT
<Michael Nemtsev>; "MVP" <nemtsev@msn.com> wrote in message
news:3d9fba1a33968c9bc906da728c4@msnews.microsoft.com...
> Hello Smith,
>
[quoted text clipped - 6 lines]
> "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
Thank you Michael,
I will give it a try.
Smith
Smith - 03 Sep 2007 14:38 GMT
Hi Michael,
The code is great. But i have the following question. How would i stream the
output directly to the client 's browser?
Many thanks in advance
Smith
Martin Honnen - 03 Sep 2007 16:01 GMT
> The code is great. But i have the following question. How would i stream the
> output directly to the client 's browser?
This line
StreamWriter sw = new StreamWriter(Server.MapPath("~/GridData.txt"),
false);
creates a StreamWriter over a file, then that StreamWriter instance sw
is used in the code.
You want to write to the Page.Response respectively its Output so doing
TextWriter sw = Page.Response.Output;
should suffice.
You should also set Response.ContentType to the MIME type for CSV before
you send anything to the client.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Hi Smith,
If I could get your email I can send you a zip file with a complete sample,
with compression. I just did this last a couple of weeks ago. email me
privately if you wish.
john
> Hello,
> My task is to create a .csv file using XSLT. Does anyone have some
[quoted text clipped - 7 lines]
> Many thanks in advance
> Smith
Smith - 04 Sep 2007 09:25 GMT
> Hi Smith,
>
[quoted text clipped - 3 lines]
>
> john
Hi John,
I have sent you the email.
I'm looking forward to recieve your code.
Cheers
Smith
John Mott - 04 Sep 2007 17:30 GMT
Hi Smith,
I didn't get anything from you at johnmott59@hotmail.com
john
>> Hi Smith,
>>
[quoted text clipped - 10 lines]
> Cheers
> Smith
Smith - 04 Sep 2007 20:53 GMT
I did sent you an email. below my email:
price_smith11@yahoo.dk
cheers
Smith