开发者

save memorystream and continue

开发者 https://www.devze.com 2023-01-22 04:51 出处:网络
I want to save MemoruStream, and I use folowing: ... response.BinaryWrite(myStream.ToArray()); response.End();

I want to save MemoruStream, and I use folowing:

...
response.BinaryWrite(myStream.ToArray());
response.End();

User gets saving dialog and he can chose to save file or to cancel saving. But, problem is that can't continue to run code if user chooses to cancel download or, if he chooses to save file. I want to call another method afther that 开发者_StackOverflow社区to update some tables in database, but I can`t do this.

So, is there some other way to save my memorystream? Some javascript or something?

Bye


Get rid of the response.End(); line and you'll be able to call other methods. Note, you won't be able to output anything to the client using Response.Write but you can update tables just fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消