Please Tell Me How to Pass Dynamic ID in Jquery Using Action Link
Please Tell Me How to Pass Dynamic ID in Jquery Using Action Link

Hello Sir, This Is my Code
$.ajax({
type: 'GET',
url: '@Url.Action("GetDetails")',
dataType: 'json',
contentType: 'application/json; charset=utf-8',
processData: true,
success: function (data) {
//alert(data);
oTable.fnClearTable();
var s = i;
for (var i = 0; i <= data.length; i++) {
var s = i;
//alert(s);
var EditFinal = '@Html.ActionLink("Edit", "Edit", new { id = 1})';
var DeleteResult = '@Html.ActionLink("Delete", "Delete", new { id = 1 })';
//alert(data[i].fnExclusiveRate);
$('#Detail').dataTable().fnAddData([
data[i].fiCityId,
data[i].fvDistrictName,
data[i].fvCityName,
EditFinal.toString(),
DeleteResult.toString()
]);
}
},
error: function (data) {
alert("no");
alert(data);
}
});
Here i Pass I Static ID as new { id = 1 } but i Want to Pass Dynamic Id which is in Variable s . so tell me How I Pass here Dynamically..
Thanks..
$.ajax({
type: 'GET',
url: '@Url.Action("GetDetails")',
dataType: 'json',
contentType: 'application/json; charset=utf-8',
processData: true,
success: function (data) {
//alert(data);
oTable.fnClearTable();
var s = i;
for (var i = 0; i <= data.length; i++) {
var s = i;
//alert(s);
var EditFinal = '@Html.ActionLink("Edit", "Edit", new { id = 1})';
var DeleteResult = '@Html.ActionLink("Delete", "Delete", new { id = 1 })';
//alert(data[i].fnExclusiveRate);
$('#Detail').dataTable().fnAddData([
data[i].fiCityId,
data[i].fvDistrictName,
data[i].fvCityName,
EditFinal.toString(),
DeleteResult.toString()
]);
}
},
error: function (data) {
alert("no");
alert(data);
}
});
Here i Pass I Static ID as new { id = 1 } but i Want to Pass Dynamic Id which is in Variable s . so tell me How I Pass here Dynamically..
Thanks..
This discussion has been closed.
Replies
http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/199579