public void GetByIdArea(int IdArea) { SubAreaBL SubAreaBL = new SubAreaBL(); List <SubAreaBE> oLista = new List <SubAreaBE>(); oLista = SubAreaBL.GetByIdArea(IdArea); // Return JSON data JavaScriptSerializer js = new JavaScriptSerializer(); string strJSON = js.Serialize(oLista); Context.Response.Clear(); Context.Response.ContentType = "application/json"; Context.Response.Flush(); Context.Response.Write(strJSON); }