I do not understand what is really your doubt but some advice, if you want to use promises, inside the ajax object you do not need to pass the functions success and error since done and fail are equivalent
const request = $.ajax({
type: "POST",
url: "Conductor.aspx/Registrapersona",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "json"
});
request.done(function (result) {
$('#myModal').modal('hide');
$('#tablapersona').show();
$('#tx').val("");
location.reload();
});
request.fail(function (msg) {
console.log(msg);
alert(msg);
});
also exists always, I would appreciate it if you explain a little more what is your doubt and put more html code.
A slaudo