0
我有我的JS創建此代碼:分頁中的WebGrid與AJAX POST請求
function PartialViewLoad() {
$.ajaxSetup({ cache: false });
$.ajax({
url: "/ControllerAlpha/MethodBeta",
type: "GET",
dataType: "html",
data:
{
strFY: $("#strFY").val(),
strMD: $("#strMD").val(),
strStatus: $("#strTarget").val(),
strLead: $("#dropLeads").val(),
strManager: $("#dropManagers").val(),
strAppName: $("#strAIRAppName").val()
},
contentType: "application/json; charset=utf-8",
success: function (result) {
$("#dataChart").html(result);
}
});
}
strTarget,dropLeads,dropManagers和strMD是字符串數組。
此代碼填充了使用剃刀助手創建的webgrid。但是,當選擇了很多選項(大約350)時,它不會調用該方法。這使得不可能調用GET方法,因爲參數的長度(它可以很好地工作在50左右)。
有可能使用Ajax的POST方法來分頁webgrid嗎?
沒有工作:( 404(未找到) –