title: Retrieve JSON Array from jQuery Ajax call in asp.net webpages
body: <p>I am trying to send some data through an ajax call of jQuery. My question is : <strong>how do I get hold of this JSON array in my <code>Insert.cshtml</code> file?</strong> I have tried <code>Request["rows"]</code>, <code>Request[0][rows]</code>, etc. but without any success.</p>
  
  <p>Here, the data I am trying to send is this (multiple rows of form data): </p>
  
  <pre><code>[
      {
          "sl": "1",
          "tname": "Gardening",
          "ttype": "4",
          "tduration": "12"
      },
      {
          "sl": "2",
          "tname": "Nursing",
          "ttype": "4",
          "tduration": "45"
      }
  ]
  </code></pre>
  
  <p>jQuery Code:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/Insert",
      data: rows,
      contentType: "application/json",
      success: function (data, status) {
          alert(status);
      },
      error: function (xhr, textStatus, error) {
          var errorMessage = error || xhr.statusText;
          alert(errorMessage);
      }
  });
  </code></pre>
  
  <p><strong>Update: A partial demo in jsfiddle</strong> - <a href="http://jsfiddle.net/rafi867/gprQs/8/" rel="nofollow">http://jsfiddle.net/rafi867/gprQs/8/</a></p>