I get the below error while converting asp.net webpage to pdf
Script control 'UpdateProgress1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Code behind file as below:
protected void btnExport_Click(object sender, EventArgs e)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=TestPage.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
this.Page.RenderControl(hw);(Exception occurs here)
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
}
Attached the codebehind and aspx pages.
Request you to help me in finding the sloution
Thanks and Regards,
Santosh Kumar

santosh kumar30 reputationPosted Jan 20, 2018, 11:56 PM EST
santosh kumar30 reputationPosted Jan 21, 2018, 12:38 AM EST
santosh kumar30 reputationPosted Jan 21, 2018, 1:13 AM EST
santosh kumar30 reputationPosted Jan 21, 2018, 7:37 AM EST
Leon DRank #851 · 2.6K reputationPosted Jan 21, 2018, 4:38 PM EST
Manav PandyaRank #166 · 14.3K reputationPosted Jan 20, 2018, 11:50 PM EST
Manav PandyaRank #166 · 14.3K reputationPosted Jan 21, 2018, 12:00 AM EST
Manav PandyaRank #166 · 14.3K reputationPosted Jan 21, 2018, 1:09 AM EST
Manav PandyaRank #166 · 14.3K reputationPosted Jan 21, 2018, 4:05 AM EST
Gajendra JangidRank #157 · 14.9K reputationPosted May 3, 2019, 2:35 AM EDT