I have seen some posts relating to this but can\'t seem to get it to work. With the redirect I get a \'resource cannot be found error\'.
I am trying to redirect to a De
If your click handler is successfully called then this should work:
$('#results').on('click', '.item', function () {
var NestId = $(this).data('id');
var url = "/Artists/Details?NestId=" + NestId;
window.location.href = url;
})
EDIT: In this particular case given that the action method parameter is a string which is nullable, then if NestId == null
, won't cause any exception at all, given that the ModelBinder won't complain about it.