VS подчеркивает idr
и пишет:
The name 'idr' does not exist in the current context
$(document).ready(function () {
$('.edit').click(function () {
idr = $(this).attr('data-id');
$.get('@Url.Action("Edit", "Main", new { id = idr })',
function (data) {
$('#Table').html(data);
});
});
});
Не пойму, почему переменная не существует? Как правильно передать значение?