Pop Up Form

Jun 3, 2011 at 1:12 PM

Hi,

I have a pop up form which requests an account number, which in turn is used to return a csv file.

The problem I have is because I return a file and not content or "ok" the pop form does not close and display the content of the csv file:

return File(new System.Text.UTF8Encoding().GetBytes(abccsv), "text/csv", "abc" + ID+ ".csv");

 

Is there anyway around this?

Regards

Jun 3, 2011 at 1:32 PM

that's why I made it to be possible to return json ( I needed that for reports)

you return json with parameters you need, and after in the successFunction(data) you do an ajax request $.post/get with the parameters sent from the server

or yo do something else like window.open or redirect etc.