protected void DownloadFile(object sender, EventArgs e) { Session["FilePath"] = "UserUploads/Attachments/"; Session["FileName"] = (sender as LinkButton).CommandArgument; lnkDownloadB.CommandArgument = Session["FileName"].ToString(); lnkDownloadB.Text = "Not downloading? Try again by clicking here."; iframeDownload.Src = "~/Download.aspx"; var openDownloadModal = new JSUtility("modalDownload"); openDownloadModal.ModalShow(this); }
protected void DownloadFile(object sender, EventArgs e) { try { Session["FilePath"] = "UserUploads/Attachments/"; Session["FileName"] = (sender as LinkButton).CommandArgument; lnkDownloadB.CommandArgument = Session["FileName"].ToString(); lnkDownloadB.Text = "Not downloading? Try again by clicking here."; iframeDownload.Src = "~/Download.aspx"; var openDownloadModal = new JSUtility("modalDownload"); openDownloadModal.ModalShow(this); } catch (Exception ex) { lblTotalQuery.Text = "Problem with downloading, please check if you added a attachment to the hardware." + ex.ToString(); } }