1

我有一个方法:

public FileStreamResult CreateReport(int Id)
{
  MemoryStream memoryStream = new MemoryStream();
  TextWriter tw = new StreamWriter(memoryStream);
  tw.WriteLine(Id.ToString());
  tw.Flush();
  memoryStream.Seek(0, SeekOrigin.Begin);
  return new FileStreamResult(memoryStream, "text") { FileDownloadName = "Report.TXT"};
}

该方法是从表触发,我想在文件下载后更新表。文件下载后有什么方法可以重定向到另一个动作?或更新与视图关联的模型?

4

0 回答 0