Html.ActionLink("User Profile", "Index", "Account", new { Area = "ABC" }, new{})
Calling Action of Area from main page in mvc4
-
21-06-2023 - |
Pergunta
I have one project where I have Index page in my main site.
I want to call action of the controller which is in area "ABC"
I have controller "Account" in both i.e. in my main site as well as in my area ABC.
From main site page I want to call Action Index of Accountcontroller which is my area ABC.
What I tried is
@Html.ActionLink("User Profile","Index", new{Area="ABC"})
This points to
http://localhost:50010/ABC/Home
Which I don't want
I have also tried
@Html.ActionLink("User Profile","Index","Account", new{Area="ABC"})
This points to
http://localhost:50010?Length=7
I am not able to find the way to solve this.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow