开发者

save memorystream and continue

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜