Layola Sweetlin

Layola Sweetlin

  • NA
  • 46
  • 5.1k

I have doubt in download a text file

Jun 25 2018 3:56 AM
when i download a file it is showing this type of error in catch block.My code is
 
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(path));
Response.WriteFile(path);
Response.End();
 
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. 
 
how i solve this error
 

Answers (1)