Q:

ASP MVC routing issue

I have a few situations with my routing I guess. I am trying to use a Url.Action for this, but it is not working as I hoped. Probably something small I just miss?
I am sitting on http://localhost:63061/service, inside the UI there is a button. Once I click on that I want it to bring me to http://localhost:63061/partdispatch
Seems quite simple right? but for some reason I just keep having the wrongs routes.
onclick="window.location.href = '@Url.Action("PartDispatch", "mainmenu")';"

routing settings:
routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "MainMenu", action = "Index", id = UrlParameter.Optional }

A:

This is how I do,
onclick="window.location = "../PartDispatch/Index";"

Or-else
onclick="window.location.href = '@Url.Action("Index", "PartDispatch")';"

Hope it helps :)

