title: A page can have only one server-side Form tag Error
body: <p><strong>Aspx page as requested</strong></p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/tier6a-educ.master" AutoEventWireup="true"
      EnableEventValidation="false" CodeFile="TAP_rubform_response.aspx.cs" Inherits="TAP_rubform_response" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="test1" runat="server"&gt;
      &lt;head&gt;
          &lt;link href="StyleSheet.css" type="text/css" rel="Stylesheet" /&gt;
      &lt;/head&gt;
      &lt;div style="padding-left: 10pt"&gt;
          &lt;form id="form1" runat="server"&gt;
  
  
          &lt;asp:Table ID="Table11" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow10" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell10" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 1: STANDARDS AND OBJECTIVES&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table38" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow11" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell11" runat="server"&gt;
                      &lt;asp:Label ID="Label22" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label23" Font-Bold="true" runat="server"&gt;    &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow34" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell44" runat="server"&gt;
                      &lt;asp:Label ID="Label48" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label49" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table12" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow12" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell12" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 2: Presenting Instructional Content&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table2" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow13" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell15" runat="server"&gt;
                      &lt;asp:Label ID="Label20" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label21" Font-Bold="true" runat="server"&gt;    &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow39" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell49" runat="server"&gt;
                      &lt;asp:Label ID="Label58" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label59" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table13" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow14" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell13" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 3: Lesson Structure and Pacing&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table3" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow15" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell18" runat="server"&gt;
                      &lt;asp:Label ID="Label24" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label25" Font-Bold="true" runat="server"&gt;    &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow35" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell45" runat="server"&gt;
                      &lt;asp:Label ID="Label50" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label51" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table14" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow16" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell14" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 4: Activities and Materials &lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table4" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow17" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell21" runat="server"&gt;
                      &lt;asp:Label ID="Label26" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label27" Font-Bold="true" runat="server"&gt;    &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow36" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell46" runat="server"&gt;
                      &lt;asp:Label ID="Label52" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label53" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table21" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow18" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell16" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 5: Academic Feedback&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table5" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow19" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell24" runat="server"&gt;
                      &lt;asp:Label ID="Label28" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label29" Font-Bold="true" runat="server"&gt;    &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow37" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell47" runat="server"&gt;
                      &lt;asp:Label ID="Label54" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label55" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table26" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow20" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell59" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 6: Grouping Students&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table6" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow21" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell27" runat="server"&gt;
                      &lt;asp:Label ID="Label30" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label31" Font-Bold="true" runat="server"&gt;    &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow38" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell48" runat="server"&gt;
                      &lt;asp:Label ID="Label56" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label57" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table32" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow40" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell71" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 7: Teacher Content Knowledge&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table7" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow23" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell30" runat="server"&gt;
                      &lt;asp:Label ID="Label32" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label33" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow24" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell31" runat="server"&gt;
                      &lt;asp:Label ID="Label34" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label35" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table39" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow42" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell91" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 8: Questioning&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table8" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow26" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell34" runat="server"&gt;
                      &lt;asp:Label ID="Label36" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label37" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow27" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell35" runat="server"&gt;
                      &lt;asp:Label ID="Label38" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label39" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table45" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow50" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell105" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 9: Thinking&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table9" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow29" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell38" runat="server"&gt;
                      &lt;asp:Label ID="Label40" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label41" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow30" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell39" runat="server"&gt;
                      &lt;asp:Label ID="Label42" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label43" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table50" runat="server" Height="16px" Width="845px"&gt;
              &lt;asp:TableRow ID="TableRow56" runat="server" orderColor="Gray" BorderWidth="1pt"
                  BorderStyle="Dotted" HorizontalAlign="Center"&gt;
                  &lt;asp:TableCell ID="TableCell117" runat="server" ColumnSpan="2"&gt;&lt;h4&gt;SECTION 10: Problem Solving&lt;/h4&gt;&lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="table10" runat="server" HorizontalAlign="center" BorderColor="Gray"
              BorderWidth="1pt" BorderStyle="Dotted" Width="850px" Style="line-height: 15pt"
              Font-Names="Trebuchet MS" Font-Size="11pt"&gt;
              &lt;asp:TableRow ID="TableRow32" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell42" runat="server"&gt;
                      &lt;asp:Label ID="Label44" runat="server"&gt;Rating &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label45" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
              &lt;asp:TableRow ID="TableRow33" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell43" runat="server"&gt;
                      &lt;asp:Label ID="Label46" runat="server"&gt;Evidence &amp;nbsp;       &lt;/asp:Label&gt;
                      &lt;asp:Label ID="Label47" Font-Bold="true" runat="server"&gt;   &lt;/asp:Label&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;asp:Table ID="Table15" runat="server" BorderColor="Gray" BorderWidth="1pt" BorderStyle="Dotted"
              Width="850px" HorizontalAlign="Center"&gt;
              &lt;asp:TableRow ID="TableRow48" runat="server"&gt;
                  &lt;asp:TableCell ID="TableCell101" HorizontalAlign="left" ColumnSpan="1" runat="server"
                      Font-Size="Large"&gt;
                      &lt;asp:Button ID="Button1" Text="Send As e-Mail" runat="server" OnClick="SendAsEmail_Click"
                          Font-Size="10pt" Height="18pt" Width="90pt" ValidationGroup="onsubmit" /&gt;
                  &lt;/asp:TableCell&gt;
                  &lt;asp:TableCell ID="TableCell19" HorizontalAlign="center" ColumnSpan="1" runat="server"
                      Font-Size="Large"&gt;
                      &lt;asp:Button ID="Button3" Text="Save As PDF" runat="server" OnClick="SaveAsPDF_Click"
                          Font-Size="10pt" Height="18pt" Width="90pt" ValidationGroup="onsubmit" /&gt;
                  &lt;/asp:TableCell&gt;
              &lt;/asp:TableRow&gt;
          &lt;/asp:Table&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>I have an aspx page and inside that I have a button that when the user clicks the page is sent to the user as an email.</p>
  
  <p>This is the code I have written for the button's click function</p>
  
  <pre><code>protected void SendasEmail_Click(object sender, EventArgs e)
  {
      StringWriter sw = new StringWriter();
      HtmlTextWriter hw = new HtmlTextWriter(sw);
      this.Page.RenderControl(hw);
  
      SmtpClient smtpClient = new SmtpClient();
      MailMessage message = new MailMessage();
  
      MailAddress fromAddress = new MailAddress("xxxxx");
      smtpClient.Host = "xxxxxxx";
      smtpClient.Port = 25;
      message.From = fromAddress;
      message.To.Add("xxxxxx");
      message.Subject = "The webpage is below";
      message.IsBodyHtml = true;
      message.Body = sw.ToString();        
      smtpClient.Send(message);
      }
  </code></pre>
  
  <p>I can receive the email fine but after the page is executed, the following error is displayed.</p>
  
  <p>I am absolutely there is only form within the page because if the implementation of the above function is empty,I do not get any error. The webpage loads fine and clicking the button does nothing.</p>
  
  <p><strong>A page can have only one server-side Form tag.</strong></p>
  
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
  
  <p>Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.</p>
  
  <p>Source Error:</p>
  
  <p>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
  
  <p>Stack Trace:</p>
  
  <pre><code>[HttpException (0x80004005): A page can have only one server-side Form tag.]
     System.Web.UI.Page.OnFormRender() +8721176
     System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +33
     System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
     System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
     System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
     System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
     System.Web.UI.Control.Render(HtmlTextWriter writer) +10
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
     System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
     System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
     System.Web.UI.Control.Render(HtmlTextWriter writer) +10
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
     System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
     System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
     System.Web.UI.Page.Render(HtmlTextWriter writer) +29
     System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
     System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
  </code></pre>
  
  <p>It seems like this error is because I am making the function call <code>this.Page.RenderControl(hw);</code></p>
  
  <p>Does anyone have any experience on how to resolve this issue?</p>
  
  <p>Thank you.</p>