Question

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.

Was it helpful?

Solution

Html.ActionLink("User Profile", "Index", "Account", new { Area = "ABC" }, new{})
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top