Introduction:
This article explains how to convert list into json in c# with example
Example:
//Your List
var Result=(List<TreeViewStructure>)Helper.ExecuteService("your context","GetDATA",null);
JavaScriptSerializer jss = new JavaScriptSerializer(); string output = jss.Serialize(Result); // It Return Json Data -----------------OR------------------------- var output= new JsonResult { Data = topItems1, ContentType = "Json",
JsonRequestBehavior = JsonRequestBehavior.AllowGet };
No comments:
Post a Comment