如何使用 jquery 方法 .load() 将参数传递给局部视图,我有这个功能
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;
});
});
在我的控制器中我有这个
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);
}
我需要那个“str”来在我的控制器中执行查询,但是我怎样才能将它发送到我的操作中