문제

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

도움이 되었습니까?

해결책

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top