In an MVC 5 app I have this bit of script
vWidth = $(window).width();
alert("1278 - Window Width - " + vWidth);
$('#HiddenField').val('1');
debugger;
jQuery.ajax({
url: '@Url.Action("ManageCreditCards", "Manage")',
type: 'POST',
data: {WindowWidth: vWidth},
success: function (response) {
$('#ManageCC_Div').html(response);
},
error: function (xhr, ajaxOptions, thrownError) {
ModalError(xhr.responseText + " - " + thrownError);
}
})
The value passing through to the controller is always nothing (null).
An alert is showing a value.
Setting debugger; in the code and stepping through it shows it has a value.
What on earth can I be missing here?
You need to sign in to view this answers
Leave feedback about this