Answer the question
In order to leave comments, you need to log in
How to insert JavaScript variable in Url.Action?
There is such a script
function GetNewContact() {
var oldId = document.getElementById("idOldContact").value;
$.ajax({
type: "GET",
url: '@Url.Action("NewContacts", "Home", new { idOldContact =oldId})',
success: function(msg){
$('#tableBody').append(msg);
}
})
}
url: '@Url.Action("NewContacts", "Home", new { idOldContact =oldId})'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question