I am trying to use a javascript variable as a parameter to a partial view call.
I have a function like this:
function myFunction(divElement, name){
divElement.append(`@Html.Partial("~/Views/Partials/_First.cshtml", name )`)
}
But this throws an error saying that the variable "name" does not exist in the current context.
Any ideas how I can achieve this?