Access the Response data as a byte[]?
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
I've been going round in circles all day with this. I'm using a 3rd party library that generates some data and sends it to the http response. The method signature is
void ALibrary.WriteTo(HttpResponse Response)
and I would use it like:ALibrary myLibraryInstance = new ALibrary(); ...//populate it with some data myLibraryInstance.WriteTo(Page.Response);
and it replaces the standard html with its custom response data. This is great when I want to output the result to a file for download (e.g. PDF, DOC, XLS), but I also want to capture that file to stick it into a blob field in a database. How do I create a dummy response object and capture the data to a byte array rather than returning it to the browser? Thanks in advance. ChrisB