title: ASP.NET Server does not process pages asynchronously
body: <p>I have a page with button, and i want to load 2 data grids with data asynchronously by cliking the button.</p>
  
  <p>This is the code of the page, I use jquery to make calls to other 2 pages that will yield me html.</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Solutions_CashCenter_StockManagement_Test_Test" %&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="cphCenter" Runat="Server"&gt;
  &lt;style type="text/css"&gt;
      #wait {
      position:absolute;
      top:0px;
      right:10px;
      width:200px;
      z-index:1000;
      vertical-align:middle;
      text-align:center;
      background: #febf00;
      display:none;
  }
  &lt;/style&gt;
  &lt;script src='&lt;%= ResolveUrl("../../../../Scripts/jquery-1.4.1.js") %&gt;' type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $(function () {
          $('#wait')
          .ajaxStart(function () { $(this).show(); })
          .ajaxStop(function () { $(this).hide(); });
  
          $('input:button').live('click', loadData);
      });
  
      function loadData() {
          $.get("Source.aspx", {},
          function (data) {
              $('#a1').html(data);
          },
          "html");
  
          alert('This alert is asynchronous (1st)');
  
          $.get("Source2.aspx", {},
          function (data) {
              $('#a2').html(data);
          },
          "html");
  
          alert('This alert is asynchronous (2nd)');
      }
  &lt;/script&gt;
  &lt;div id="test13"&gt;
      &lt;input type="button" id="btnLoad" value="Load" /&gt;
  &lt;/div&gt;
  &lt;div id="a1"&gt;&lt;/div&gt;
  &lt;div id="a2"&gt;&lt;/div&gt;
  &lt;div id="wait"&gt;Please wait &lt;img src="ajax-loading.gif" /&gt;&lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Then I have 2 aspx pages, Source1.aspx and Source2.aspx.  They only containe a gridDataView and little code in OnLoad event.</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Source.aspx.cs" Inherits="Solutions_CashCenter_StockManagement_Test_Source" %&gt;
  &lt;form runat="server"&gt;
  &lt;cc1:GridDataView runat="server" ID="gridTest" &gt;
  &lt;/cc1:GridDataView&gt;
  &lt;asp:SqlDataSource ID="dsTest" runat="server" ConnectionString="&lt;%$ ConnectionStrings:WebPortalConnectionString %&gt;"
      ProviderName="&lt;%$ ConnectionStrings:WebPortalConnectionString.ProviderName %&gt;"&gt;
  &lt;/asp:SqlDataSource&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Server-side:</p>
  
  <pre><code>Thread.Sleep(5000);
  dsTest.SelectCommand = "SELECT 'test1', 'test2', 'test3'";
  this.gridTest.DataSourceID = "dsTest";
  this.gridTest.DataBind();
  </code></pre>
  
  <p>And the same for the second page, but with different data for the grid.</p>
  
  <p>What I have in result is that both alerts happen at once, but the grids are loaded one after one, that is 1st grid appears after 5 seconds, and then second one appers after another 5 sec.
  That is the server does not actually process them concurrently.</p>
  
  <p>What am I doing wrong and how should I organize all to work as I need?</p>