title: Accessing ajax POST response in javascript
body: <p>I'm making ajax POST request from javascript function:</p>
  
  <pre><code>function UpdateMetrics() {
     $.ajax({
                type: "POST",
                url: "MyHandler.ashx?Param1=value1",
                data: "{}",
                contentType: "text/json; charset=utf-8",
                dataType: "text",
                success: function (msg) {
                    var jsonUpdatedData = msg;
                    ...
                }
            });
  }
  </code></pre>
  
  <p>From my handler, I'm sending json string with:</p>
  
  <pre><code>context.Response.write(json);
  </code></pre>
  
  <p>I think I'll get it in <code>msg</code>. </p>
  
  <p>I also want to send other string (count). So I'm trying to use header info along with json data. So I added this line:</p>
  
  <pre><code>context.Response.Headers.Add("MaxCount",Convert.ToString(tempList.Count)); 
  </code></pre>
  
  <p>If this is right way to do it, how can I access it in my <code>success</code> function?</p>