title: Is this valid data for jquery ajax call to aspnet mvc controller?
body: <p>I am using jquery with asp.net mvc.... Is my data option valid or am i missing some thing...</p>
  
  <pre><code>$.ajax({
              type:"POST",
              url: "Materials/GetRecords",
              data: "{'currentPage':1,'pageSize':5}",
  </code></pre>
  
  <p>Any suggestion....</p>
  
  <p><strong>EDIT:</strong>
  I am calling a function from a view page,</p>
  
  <pre><code> &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              getMaterials(0);
            });
      &lt;/script&gt;
  </code></pre>
  
  <p>and my function is,</p>
  
  <pre><code>function getMaterials(currentPage) {
      $.ajax({
          type:"POST",
          url: "Materials/GetRecords",
          data: "{'currentPage':" + (currentPage + 1) + ",'pageSize':5}",
          contentType: "application/json; charset=utf-8",
          cache: false,
          global: false,
          async: false,
          dataType: "json",
          success: function(data) {
              var divs = '';
              $("#ResultsDiv").empty();
              $.each(data.Results, function() {
                  divs += '&lt;div class="resultsdiv"&gt;&lt;br /&gt;&lt;span style="display: inline-block;width:150px;" class="resultName"&gt;' + this.Mat_Name + '&lt;/span&gt;&lt;span class="resultfields" style="padding-left:10px;"&gt;Measurement&amp;nbsp;:&lt;/span&gt;&amp;nbsp;&lt;span class="resultfieldvalues"&gt;' + this.Mes_Name + '&lt;/span&gt;&amp;nbsp;&lt;a href="/Materials/Delete/' + this.Id + '"&gt;Delete&lt;/a&gt;&amp;nbsp;&lt;a href="/Materials/Details/' + this.Id + '"&gt;Details&lt;/a&gt;&amp;nbsp;&lt;a href="/Materials/Edit/' + this.Id + '"&gt;Edit&lt;/a&gt;&lt;/div&gt;';
              });
              alert("hai");
              $("#ResultsDiv").append(divs);
              $(".resultsdiv:even").addClass("resultseven");
              $(".resultsdiv").hover(function() {
                  $(this).addClass("resultshover");
              }, function() {
                  $(this).removeClass("resultshover");
              });
              $("#HfId").val("");
              $("#HfId").val(data.Count);
          }
      });
      return false;
  }
  </code></pre>
  
  <p>on the view page load i see an alert saying <code>[Object object]</code>.. Why this...</p>