public void ProcessRequest(HttpContext context) { xSubmitHandler submitData = new xSubmitHandler(context); Response response = new Response(true); try { string json = submitData.Json; XmlNode xml = submitData.Xml; List<Country> objects = submitData.Object<Country>(); //process data } catch (Exception e) { response.Success = false; response.Message = e.Message; } response.Write(); }