ビューからコントローラーにパラメーターを渡そうとしていますが、次のように なります。アクションGetCompanyDataWithIdを実行しようとすると、値をnullにすることはできません。
実行が成功すると、パラメーターがコントローラーに渡され、jqGridの入力に使用されるJSONデータが返されます。
値が適切に渡されていないようです何かアイデアはありますか?
$("#dropdwnlist").change(function () {
var value = $(this).val();
$.ajax({
url: '<%= Url.Action("GetCompanyDataWithId", "Billing") %>',
type: "POST",
data: { companyid: "25" },
success: function (data) {
alert(data);
$('#Bgrid').setGridParam({ url: '<%= Url.Action("GetCompanyDataWithId", "Billing") %>'});
$('#Bgrid').trigger('reloadGrid');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(xhr.responseText);
}
}).done(function (msg) {
alert("Data Saved: " + msg);
});
});