This is my code below and I am trying to pass the ID variable Url.Action method
I can't work out how to do it.
Thanks
function onRowSelected(e开发者_C百科) {
var ID = e.row.cells[0].innerHTML;
$.get('@Url.Action("GetTestStepByID","AlternativeTest", new { id = ID } )', function (data) {
$('#accordion').replaceWith(data);
});
}
You can try this
function onRowSelected(e) {
var ID = e.row.cells[0].innerHTML;
$.get('@Url.Action("GetTestStepByID","AlternativeTest")' + '/' + ID, function (data) {
$('#accordion').replaceWith(data);
});
}
精彩评论