How can i pass parameters to a partial view using jquery method .load() , i have this function
var str;
var x;
x = $("#whereQuery");
str = x.attr("value");
$("#btnSearch").click(function () {
$('#budgetsKey').dialog({
modal: true,
title: "Clave presupuestal de ingresos",
width: 550,
minWidth: 400,
maxWidth: 650,
show: "slide",
hide: "slide",
draggable: false,
resizable: false,
open: function(event, ui) {
//Load the CreateAlbumPartial action which will return
// the partial view _CreateAlbumPartial
$(this).load("@Url.Action("Prueba2")", { str: str});
}
});
return false;
});
});
and in my controller i have this
public PartialViewResult Prueba2(String str)
{
List<PTI_IncomeBudgetTransference> incomeBudgetTransferenceList;
cmp_Company = this.masterService.company.GetById(1);
//Recupera las cuentas por pagar por autorizar
incomeBudgetTransferenceList = siagService.incomeBudgetTransference.GetAll(this.cmp_Company.CMP_ID, "Pendiente de Autorización");
return PartialView("Prueba2", incomeBudgetTransferenceList);
}
and i need that "str" to execute a query in my controller, but how can i send it to my action