asp.net - ASP MVC routing issue -


i have few situations routing guess. trying use url.action this, not working hoped. small miss?

i sitting on http://localhost:63061/service, inside ui there button. once click on want bring me http://localhost:63061/partdispatch

seems quite simple right? reason keep having 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 } 

this how do,

onclick="window.location = "../partdispatch/index";" 

or-else

onclick="window.location.href = '@url.action("index", "partdispatch")';" 

hope helps :)


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -