public ActionResult DisposableLoadMenus() { var id = Request["id"]; int parent = 0; int.TryParse(id, out parent); var result = menu_service.DisposableLoadMenus(parent); return(Json( from s in result select new { id = s.SysNo, text = s.MenuName, parent = s.ParentSysNo == 0 ? "#" : s.ParentSysNo.ToString(), data = s } , JsonRequestBehavior.AllowGet)); }