views:

28

answers:

1

Hello,

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 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

A: 

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.

Shadow Wizard