public JsonpResult UpdateComponent(string appid, string componentid, string compName, string title, string category, string titleformat) { string clientid = Request.Params["clientkey"]; var a = new Tz.App.AppManager(clientid, appid); a.GetComponents(); var comp = a.GetComponent(componentid); if (comp != null) { comp.ComponentName = compName; comp.Title = title; comp.TitleFormat = titleformat; comp.Category = category; return(new JsonpResult(a.UpdateComponent(comp))); } else { throw new Exception("This component not exist. Please contact service provider"); } }