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) {
var ID = e.row.cells[0].innerHTML;
$.get('@Url.Action("GetTestStepByID","AlternativeTest", new { id = ID } )', function (data) {
$('#accordion').replaceWith(data);
});
}
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) {
var ID = e.row.cells[0].innerHTML;
$.get('@Url.Action("GetTestStepByID","AlternativeTest", new { id = ID } )', function (data) {
$('#accordion').replaceWith(data);
});
}
Share
Improve this question
asked Aug 25, 2011 at 21:01
JonJon
40.1k87 gold badges243 silver badges393 bronze badges
1 Answer
Reset to default 5You can try this
function onRowSelected(e) {
var ID = e.row.cells[0].innerHTML;
$.get('@Url.Action("GetTestStepByID","AlternativeTest")' + '/' + ID, function (data) {
$('#accordion').replaceWith(data);
});
}
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744834636a4596189.html
评论列表(0条)