Url.Action parameter name as a function parameter. Here i use actionNameParameter as a function parameter now how i write this parameter on url: '@Url.Action(actionNameParameter)' I tried this code but it does not work. But i write like url:'@Url.Action("StringactionName")' then it works. But i need to use the function parameter as @Url.Action(actionNameParameter)
function example(actionNameParameter) {
$.ajax({
type: 'POST',
url: '@Url.Action(actionNameParameter)'
});
}