title: How to return JSON with ASP.NET & jQuery
body: <p>I cannot get how I can return JSON data with my code.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$(function () {
  $.ajax({
          type: "POST",
          url: "Default.aspx/GetProducts",
          data: "{}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
              // How to return data here like a table???  
              $("#Second").text(msg.d);
              //alert(msg.d);
          }
      }); 
  });
  </code></pre>
  
  <p><strong>C# of Default.aspx.cs</strong></p>
  
  <pre><code>[WebMethod]
  public static string GetProducts()
  {
     var products  = context.GetProducts().ToList();   
     return What do I have to return ????
  }
  </code></pre>
  
  <p>Thanks in advance!</p>