private static void ResponseResult(HttpContext context) { var aList = DataItem.GetList(9); var aResult = new ClientResult(); aResult.DataList = aList; var aResultString = JsonConvert.SerializeObject(aResult); context.Response.Write(aResultString); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/x-json"; context.Response.AddHeader("Access-Control-Allow-Origin", "*"); //context.Response.AddHeader("Access-Control-Allow-Headers", "X-Requested-With"); var aEmail = context.Request.Form["email"]; var aPassword = context.Request.Form["password"]; //ResponseResult(context); var aList = DataItem.GetList(9); var aResult = new ClientResult(); aResult.DataList = aList; aResult.Email = aEmail; aResult.Password = aPassword; var aResultString = JsonConvert.SerializeObject(aResult); context.Response.Write(aResultString); }