I'm currently collecting ideas how to solve the following issue: I'm generating Report in realtime and returning it to the browser using the File method.
public ActionResult GenerateReport()
{
var report = ... // Don't care, we get an object containing an Id and a byte array
var reportId = report.Id; // this is actually important
return File(report.Data, "..."); // Return data with some content type, filename etc.
}
When the action is executed, the browser will prompt the file download. But I'd also somehow like to transfer the new Id to the Browser which I need for processing.
Do you have any idea how I could solve this using the common JavaScript (jQuery) and Web/ASP.NET/Ajax or whatever techniques?