title: Store the LINQ query result as JSON object and passing to javascript
body: <p>I have a query which i added to a list. Now I need to use it in the javascript.It is being done in ASP.NET 3.5. So, I need to send it as a JSON object. This is what I've done:(I'm not sure if this is correct way of getting a JSON object. Correct me if i'm wrong.</p>
  
  <pre><code>    List&lt;NCDCPoint&gt; dupli = (from n in CDC.NCDCPoints
                               where n.EVENT_TYPE_ID == et
                               where n.BeginDate == b
                               where n.EndDate == e
                               select n).ToList&lt;NCDCPoint&gt;();
    System.Web.Script.Serialization.JavaScriptSerializer oSerializer =
   new System.Web.Script.Serialization.JavaScriptSerializer();
     string sJSON = oSerializer.Serialize(dupli); 
  
  
  
  
  
  } 
  </code></pre>
  
  <p>This is how my jquery looks</p>
  
  <pre><code>   $.ajax({
              type: "POST", url: "Data.aspx/CheckInsertRecord",
              data: "{EventType:'" + eventtype + "',BeginDate:'" + begindate + "'," +
                     "EndDate:'" + enddate+"' }",
              contentType: "application/json; charset=utf-8", dataType: "json",
              success: function (msg) {
              alert(msg.d);
              if(msg.d == "true")
          {
          Showduplicate();
          }
              }
          });
  </code></pre>
  
  <p>So, kindly let me know what I need to do next? One more thing is I already return true or false back to the $.ajax{} in aspx page. So how am is supposed to send JSON object?</p>