public HttpResponseMessage GetEmployeeByID(int empID) { HttpResponseMessage response = new HttpResponseMessage(); DataSet ds = new DataSet(); try { //int empID = Convert.ToInt32(frm.Get("empID")); ds = objEmp.GetEmployeeDataByID(empID); var data = ds.DataSetToJSON(); response = this.Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent(data, Encoding.UTF8, "application/json"); } catch (Exception e) { throw; } return(response); }