title: Using Jquery and Ajax in ASP.NET
body: <p>I am using ajax and jquery to load contents into a div.</p>
  
  <p>My jquery looks like this </p>
  
  <pre><code>  $("a.trigger").click(function() {
  
     $.ajax({
  
      type: "POST",
  
      url: "GetStuff.aspx",
  
      data: "id=0",
  
      success: function(response){
  
       $("#contentDiv").html(response);
  
      }
  
     });
  
       });
  </code></pre>
  
  <p>In GetStuff.aspx I would like to write some asp.net html controls like</p>
  
  <pre><code>  private void Page_Load(object sender, System.EventArgs e)
  
    {
  
        Response.Expires = -1;
  
        Response.ContentType = "text/plain";
  
        Response.Write("&lt;asp:Label id=\"label1\" runat=\"server\" text=\"helloworld\"/&gt;");
  
        Response.End();
  
    }
  </code></pre>
  
  <p>However the label does not appear on the page.</p>
  
  <p>I tried to put the asp:Label in my aspx file like this</p>
  
  <pre><code>&lt;%@ Page Language="C#" Inherits="Untitled.GetStuff" %&gt;
  
  &lt;asp:Label id="label12" runat="server" text="helloworld2"/&gt;
  </code></pre>
  
  <p>It also does not work.
  How can I get asp.net html controls to show up?</p>