public void UploadImg(HttpContext context) { if (context.Request.Files.Count > 0) { var imgSrc = SerializeHelp.UploadFile(context); var res = new { msg = "ok", code = 0, src = imgSrc }; context.Response.Write(SerializeHelp.ToJson(res)); } else { var res = new { msg = "no", code = 500, src = "" }; context.Response.Write(res); } }