<asp:Button ID="ButtonDownload" runat="server" OnClick="ButtonDownload_Click" class="c-btn c-btn--mini c-btn--primary" Text="Download" ></asp:Button>
protected void ButtonDownload_Click(object sender, EventArgs e) { ShowErrorAlertMessage(false);
var webApiService = new WebApiService(TestUrl); var outputRootFolder = Server.MapPath("~/App_Data/"); webApiService.GenerateReportFromApi(LabelTest.Text); Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", $"filename={fileName}"); Response.TransmitFile(filePath); Response.End();
}