7/19/2023 0 Comments Download razor sqlReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable MemoryStream.Read(bytesInStream, 0, CInt(memoryStream.Length))Ĭ = "application/octet-stream"Ĭ("Content-Disposition", GetContentDisposition(strFileName))Ĭ(bytesInStream) ![]() 'memoryStream.Write(bytesInStream, 0, bytesInStream.Length) ' = "text/plain"ĭim memoryStream As New System.IO.MemoryStream()ĭim textWriter As System.IO.TextWriter = New System.IO.StreamWriter(memoryStream)ĭim bytesInStream As Byte() = New Byte(memoryStream.Length - 1) Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Then you write this csv-file to HttpContext.Response and set the attach header. ![]() Then you use the FileHelpers Library to create a csv file: (dataTable, filename) If you do it that way, the file gets saved on the sql server.
0 Comments
Leave a Reply. |