When I sent data by AJAX to a page that processes an update to the DB, it does not show me a success message that I place if the operation was executed correctly, when I retrieve the variable of the success function: function (variable)...
the code of my ajax is the following:
$.ajax({
type: 'POST',
url: 'procesaConfirmacion.vbhtml',
data: $('#enviaConfirmacion').serialize(),
beforeSend: function () {
$("#muestraFormulario").hide();
cargando.show();
},
success: function (dataaaa) {
cargando.hide();
$('#resultado').hide().html(dataaaa).fadeIn(900);
}
});
You cannot directly invoke a vbhtml with $.ajax, you have to do it through an action in a controller
You will see that I define
indicating the url to the action that will return the render of the view
procesaConfirmacion.vbhtml
in the controller you define