public JsonResult DeleteUser(string val) { string temp; IDatabaseAdapter adapter = DatabaseAdapter.Instance(); try { /*string id; * // Remove escape characters if needed - they may be automatically added in * if (val.Length > 36) * { * id = val.Substring(1, 36); * } * else * { * id = val; * } * Guid userID = new Guid(id);*/ // Send request to database adapter temp = adapter.DeleteUser(ConvertStringToGuid(val)); } catch { return(Json("User not deleted")); } return(Json(temp)); }