title: webserivce is called from my jquery
body: <p>I have created a code like this to access method AddNums in my webservice. I am sending data through webservice to get output. but it is not giving any output. </p>
  
  <pre><code>   &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
     &lt;script src="scripts/Jquery%20v1.6.4.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  
     $(document).ready(function () {
      $("#btn").click(function () {
          alert('I have been clicked');
          $.ajax({
              type: "POST",
              url: "http://localhost:5554/Service1.svc",
              data: "{2,3}",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (msg) {
                  $("#output").text(msg.d);
              }
          });
  
      });
      });
  
      &lt;/script&gt;
      &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
       &lt;/head&gt;
       &lt;body&gt;
       &lt;form id="form1" runat="server"&gt;
  
        &lt;input type="button" id="btn" value="Click Me" /&gt; &lt;br /&gt; &lt;br /&gt;
  
         &lt;span id="output"&gt;&lt;/span&gt;
  
         &lt;/form&gt;
        &lt;/body&gt;
         &lt;/html&gt;
  </code></pre>
  
  <p>Implementation of webserivce. I have tested webservice with inbuilt client in Visual Studio, it is working perfectly. </p>
  
  <pre><code>  namespace WcfServiceTest
    {
  
      [System.Web.Script.Services.ScriptService]
     public class Service1 : IService1
     {
      public string GetData(int value)
      {
          return string.Format("You entered: {0}", value);
      }
  
      public CompositeType GetDataUsingDataContract(CompositeType composite)
      {
          if (composite == null)
          {
              throw new ArgumentNullException("composite");
          }
          if (composite.BoolValue)
          {
              composite.StringValue += "Suffix";
          }
          return composite;
      }
  
     [System.Web.Services.WebMethod(BufferResponse = false)]
      public int AddNums(int val1, int val2)
      {
          return (val1 + val2);
      }
  
       }
      }
  </code></pre>