title: convert an asp.net webpage to pdf With Ajax Tab Container
body: <p>I am creating an website which have too much data import and exports,users all data are displayed in ajax tab container,my problem is that when i am try to export those data in PDF it displays following error:</p>
  
  <pre><code>Script control 'TabPanel1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
  </code></pre>
  
  <p>Parameter name: scriptControl</p>
  
  <p>i am using <code>iTextSharp</code> dll library for Exports all data which contain in tab panels in pdf
  on code side i declare all name spaces :</p>
  
  <pre><code>using System.IO;
  using System.Collections.Generic;
  using System.Text;
  using iTextSharp.text;
  using iTextSharp.text.html.simpleparser;
  using iTextSharp.text.pdf;
  </code></pre>
  
  <p>and set an code for export page into pdf :</p>
  
  <pre><code> protected void pdf_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);
  
          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();
      }
  </code></pre>
  
  <p>But it displays above error, can anyone can help me:</p>