I am trying to use the response.write method to download a file, I have put together some sample code from the MSDN etc. However everytime I run the code Internet Explorer seems to crash/GPF.
I am trying to write an aspx that will generate text file file so the user can download it. I'm sure it must be possible and I'd appreciate any guidance over this, even if only to know that it works elsewhere! The code I have written is: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x As IO.TextWriter Response.ContentType = "text/html" Response.AddHeader("content-disposition", "attachment; filename=Merge.txt") x = Response.Output x.WriteLine("1") x.WriteLine("2") x.WriteLine("3") Response.End() End Sub Thanks Colin You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.