try { HtmlAnchor anchor = (HtmlAnchor)sender; System.IO.FileInfo targetfile = new System.IO.FileInfo(anchor.HRef); if (targetfile.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + targetfile.Name); Response.AddHeader("Content-Length", targetfile.Length.ToString()); Response.ContentType = "application/x-shockwave-flash"; Response.WriteFile(targetfile.FullName); } } catch (Exception ex) { LogException(ex); }