title: How to send json object to C# web server
body: <p>I write this java script to send json object to c# web service. but its not work..Why is it?
  this is my javascript..</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery- 1.5.1.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
       function BindJson() {
  
   document.getElementById("demo").innerHTML=Date();
          $.ajax({
              type: "POST",
              url: "Service1.asmx/SerializeJson",
              data: JSON.stringify({ person:{ firstName: "Denny" }}),
  
              contentType: "application/json; charset=utf-8",
              dataType: "json",
  
              success: function (data2) {
                alert(data2.d);
              },
              error: function (request, status, errorThrown) {
                  alert(status);
              }
          }); 
     } 
  &lt;/script&gt;
  </code></pre>
  
  <p>And this is my server class ..</p>
  
  <pre><code> [System.Web.Script.Services.ScriptService]
   public class Service1 : System.Web.Services.WebService
   {
      [WebMethod]
      public string SerializeJson(Person person)
      {
          return "Success";
      }
      public class Person
      {
          public string firstName { get; set; }   
      }   
   }
  </code></pre>