When coding a MVC 5 view, how do I redirect to a specific action result specifying the controller, action result and a parameter?
I am wanting to redirect to this action result in a Dashboard
controller:
public ActionResult Location(long id)
{
}
I am wanting to do this in a javascript function if possible.
Here is my javascript code:
function MapMarkerClick(locationId)
{
Response.Redirect(Url.Action("Location", "Dashboard", new { id == locationId }));
}
This is the error that I am getting in the browser console:
Uncaught SyntaxError: Unexpected token ==