I am passing parameters to @Url.Action like this:
function showHistory()
{
myId= $("#id").val();
//alert(myId);
actionDialog.load("@Url.Action("ActionHistoryAjax", new {id = myId, sort = "abc"})", function () {
actionDialog.dialog('open');
});
}
But gives error "the name myId does not exist in the current context".
How i can pass the variable?
I solved this, this is the solution:
function showHistory()
{
myId= $("#id").val();
//alert(myId);
actionDialog.load("@Url.Action("ActionHistoryAjax", new {id = "_Id", sort = "abc"})".replace("_Id", DeviceID), function () {
actionDialog.dialog('open');
});
}