title: Passing Array to WebMethod using jquery ajax is not working in asp.net
body: <p>I am trying to send all gridview records to webmethod using jquery ajax but it is not working. Here is my code</p>
  
  <pre><code>function Save() {
              var TableData = new Array();
  
              $('[id*=GridView1] tr').each(function (row, tr) {
                  TableData[row] = {
                      "Sr"    : $(tr).find('td:eq(0)').text()
                    , "RollNo": $(tr).find('.RollNo').val()
                    , "Name"  : $(tr).find('.Name').val()
                    , "Marks" : $(tr).find('.Marks').val()
                  }
              });
                          TableData.shift();
              $.ajax({
                  type: "POST",
                  url: "TestPage.aspx/SaveData",
                  data: "{Data:'" + JSON.stringify(TableData) + "'}",
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (msg) {
                      alert(msg.d);
                  }
              });
              return false;
          }
  </code></pre>
  
  <p>and Code Behind</p>
  
  <pre><code>  [WebMethod]    
      public static string SaveData(List&lt;string&gt; Data)
      {      
         //My Code
          return "Success";
      }
  </code></pre>
  
  <p>Help me guys....</p>