Is to generate the XLSX document flow (MemoryStream) into a byte [], pushed to the client directly by the Response. BinaryWrite method (through the Response at the same time. The AddHeader save file name to the client a default)
Public void PushToClient (string ShowFileName, HttpResponse Response)
{
MemoryStream ms=new MemoryStream ();
WB. Write (ms);
Response. The ContentType="application/octet - stream";
The Response. AddHeader (" the Content - the Disposition ", "legislation; Filename="+ HttpUtility. UrlEncode (ShowFileName, System. Text. Encoding. UTF8));
The Response. BinaryWrite (Ms. ToArray ());
The Response. The Flush ();
The Response. The End ();
}
But now the project core, found that Microsoft. AspNetCore. Http. HttpResponse does not provide this way!
Could you tell me how to write the code above into the core to? Thank you!