text: CodePlexProject Hosting for Open Source Software
  Look at the following code first:
  public class Product
  {
  public string Name;
  public DateTime Expiry;
  public double Price;
  }
  public void CreateObject()
  {
  Product product = new Product();
  product.Name = "Apple";
  product.Expiry = new DateTime(2008, 12, 28);
  product.Price = 4.56;
  string json = JsonConvert.SerializeObject(product);
  }
  /*****************************************************************************************/
  I have simply created a class 'Product' and its object 'product' and converted it into the json string using 'JsonConvert.SerializeObject'.
  Now i want to pass this 'json' string into the javascript.
  Can any one please tell me how to do that ?
  How to use json.net in the javascript ?
  You could just put this into a panel object and then on page load, call a JavaScript function which reads the contents of the DIV.
  Or you could setup a AJAX request within the page, that on page load or at time
  t, will call another page or the same page and return the JSON using a Response.Write() and Response.End().
  Can we have anything which allows us to use json.net in javascript code.
  I actually want to use it in the javascript code. I want to deserialize the json string in the javascript code.
  I don't want to use the Response.Write() or .End().
  Can we do anything like taking the Handler file and using Json.Stringify() .... something like that ?
  What I want to do:
  I want to do the call from javascript funtion to the C# function (may be webmethod)
  then it will send me a response as a json string which i will deserialize in javascript only, so please help me !
  May be i will do the asynchronous call from javascript function to get the json string.
  Are you sure you want to delete this post? You will not be able to recover it later.
  Are you sure you want to delete this thread? You will not be able to recover it later.