title: Load ascx via jQuery
body: <p>Is there a way to load ascx file by jQuery?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>thanks to @Emmett and @Yads. I'm using a handler with the following jQuery ajax code:</p>
  
  <pre><code> jQuery.ajax({
      type: "POST",  //GET
      url: "Foo.ashx",
      data: '{}',
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      success: function (response)
      {
          jQuery('#controlload').append(response.d); // or response
      },
      error: function ()
      {
          jQuery('#controlload').append('error');
      }
   });
  </code></pre>
  
  <p>but I get an error. Is my code wrong?</p>
  
  <p>Another <strong>Update</strong> : 
  I am using </p>
  
  <pre><code>error: function (xhr, ajaxOptions, thrownError)
  {
      jQuery('#controlload').append(thrownError);
  }
  </code></pre>
  
  <p>and this is what i get : </p>
  
  <blockquote>
    <p>Invalid JSON:<br>
    Test  =>(this test is label inside my ascx)</p>
  </blockquote>
  
  <p>and my ascx file after Error!!!</p>
  
  <p>Another <strong>Update</strong> : </p>
  
  <p>my ascx file is somthing like this:</p>
  
  <pre><code>&lt;asp:DropDownList ID="ddl" runat="server" AutoPostBack="true"&gt;
      &lt;asp:ListItem&gt;1&lt;/asp:ListItem&gt;
      &lt;asp:ListItem&gt;2&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  &lt;asp:Label ID="Label1" runat="server"&gt;Test&lt;/asp:Label&gt;
  </code></pre>
  
  <p>but when calling ajax i get this error in asp: :(</p>
  
  <blockquote>
    <p>Control 'ctl00_ddl' of type 'DropDownList' must be placed inside a form tag with runat=server.</p>
  </blockquote>
  
  <p>thanks to @Yads. but his solution only work with html tag.</p>