#region download-file
static public void DownloadFile(string filePath)
{
try
{
filePath = filePath.Replace(" ", "_");
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + System.IO.Path.GetFileName(filePath));
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.WriteFile(filePath);
HttpContext.Current.Response.End();
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
Showing posts with label file save open dialog box. Show all posts
Showing posts with label file save open dialog box. Show all posts
Subscribe to:
Posts (Atom)
.net core
Sure, here are 50 .NET Core architect interview questions along with answers: 1. **What is .NET Core, and how does it differ from the tradi...
-
The error message you encountered ("DeleteService FAILED 1072: The specified service has been marked for deletion") indicates tha...
-
When running npx (with any arguments, but -v is easiest to test) from the global install folder, the following error is produced. ...