jQuery.Load(.aspx) not working
<p>I'm trying to load an aspx file into a div, but it won't work if the aspx file has asp.net controls.  (It's kinda the point.) If I only have html controls, it works fine, but not with runat="server".  I've stripped the main file and the .aspx file to almost nothing.  Also, the code behind isn't catching the data being passed in - PageSize.  Not even when only using the html elements.  Why won't the aspx page load?  I've tried taking out all the html tags, passed the data as "PageSize":"50", "PageSize":50 and other combinations.  No luck. </p>

<pre><code>&lt;%@ Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs"     Inherits="jQueryTutorial.SiteMaster" %&gt;

&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head runat="server"&gt;
&lt;meta charset="utf-8" /&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
&lt;title&gt;&lt;/title&gt;
&lt;webopt:BundleReference runat="server" Path="~/Content/css" /&gt;
&lt;script src="Scripts/jquery-1.10.2.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;

    $(document).ready(function () {
        $('#MyButton').click(function () {
            $('#OutputDiv').load('GetCustomers.aspx', { PageSize: 10 },
                function (response, status, xhr)
                {
                    if (status == "error")
                        alert(xhr.error);
                    //else
                    //    alert('Loaded');
                });
        });
    });

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;button id="MyButton"&gt;Click to get HTML&lt;/button&gt;
    &lt;div id="OutputDiv"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>.aspx file to be loaded:</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GetCustomers.aspx.cs" Inherits="jQueryTutorial.GetCustomers" %&gt;

&lt;!DOCTYPE html&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type="button" value="Press me" /&gt;
&lt;input id="abc" /&gt;
&lt;%--    &lt;asp:Button ID="Button1" Text="Button" runat="server" /&gt;--%&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Code behind asps file to be loaded:</p>

<pre><code>using System;

namespace jQueryTutorial
{
public partial class GetCustomers : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var pageSize = 50;
        if (Request["PageSize"] != null) 
            pageSize = Int32.Parse(Request["PageSize"]);
    }
}
}
</code></pre>