Question

So I have this action link

@Html.ActionLink("Logout","LogoutConfirmation","Login")

which takes me to a url like:
mysite.com/myaccount/Login/LogoutConfirmation
however the folder isnt located in "myaccount" its just that is my current location on this webpage. How can I make the action link to take me to:
mysite.com/Login/LogoutConfirmation
instead of the folder "myaccount".

Était-ce utile?

La solution

As stated in my comment, just use the overloaded method to include an empty Area.

@Html.ActionLink("Logout","logoutConfirmation", "Login", new {Area=""},null)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top