I am able to redirect the user with code in a function like this:
window.location.href = "@Url.Action("ShippingSummary", "Shipping", new { id = 2 })"
I have the id in a variable but I need to assign it to the ActionLink dynamically. Something like this
var ID = 2;
window.location.href = "@Url.Action("ShippingSummary", "Shipping", new { id = ID })"
I get an error that ID is not defined. I have tried to create the actionlink as a string first but that didn't work. How can I get this to work?