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".

Was it helpful?

Solution

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top