title: How do I get Ajax request data with jQuery?
body: <p>I have an Ajax request:</p>
  
  <pre><code>$.ajax({ url: "MyPage.aspx", 
      data: params,
      success: function(data) {
          // Check results                
          $('#testp').append(data.message);
          enableForm();
      },
      error: function() {
          alert('Unable to load the permissions for this user level.\n\nYour login may have expired.');
          enableForm();
      },
      dataType: "json"
  });
  </code></pre>
  
  <p>On the request page there is C# code that does this at the end of Page_Load:</p>
  
  <pre><code>Response.AppendHeader("X-JSON", result);
  </code></pre>
  
  <p>'result' is formatted like this:</p>
  
  <pre><code>{ "success": true, "message": "SUCCESS", "user_level": 25, "switches": [ { "number": 30, "is_enabled": false, "is_default": false }, { "number": 30, "is_enabled": false, "is_default": false } ]}
  </code></pre>
  
  <p>The request returns successfully, but 'data' is null. What am I missing?</p>
  
  <p>Thanks.</p>