Gentlemen,
I am in a question.
I'm working with ASP.NET MVC
and I'm running Ajax
via post
.
The requirement is to load two grids with a Ajax
for each grid.
Strictly speaking, it would be something like that, Example:
Controller:
Public ActionResult grilla1()
{
return JSon(Datajson.cargagrilla1());
}
public ActionResult grilla2()
{
return JSon(Datajson.cargagrilla2());
}
$(document).ready(function(){
$.ajax({
url: "@(Url.Action("grilla1", "CargaGrillas"))",
type: "POST",
dataType: "json",
//data: ({ "rut": firstName }),
success: function (Result) {
Grilla1(Result);
}});
$.ajax({
url: "@(Url.Action("grilla2", "CargaGrillas"))",
type: "POST",
dataType: "json",
//data: ({ "rut": firstName }),
success: function (Result) {
Grilla1(Result);
}});
});
NOTE: They are examples nothing else, it is not necessary to analyze the code only its flow of execution:).
PS: The query is, since there are two independent ajaxes, the route of its execution will be simultaneous or the second ajax will have to wait for the first ajax to run and return its data and when the first ajax finishes its execution it will Could you run the second Ajax ??
I remain attentive to your comments, I hope you have understood me.