I have different files in upload folder with .doc, .docx, .pdf, .xls etc and i want to download file when click on image. I am calling http generic handler from jquery values are pass correctly but not working
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileInfo.Name);
HttpContext.Current.Response.AppendHeader("Content-Length", fileInfo.Length.ToString());
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.TransmitFile(fileInfo.FullName);
HttpContext.Current.Response.Flush();