Route Values for Area (MVC3)
Posted
by
Jim
on Stack Overflow
See other posts from Stack Overflow
or by Jim
Published on 2011-02-21T09:08:40Z
Indexed on
2011/02/24
7:25 UTC
Read the original article
Hit count: 168
Hi,
I am using areas in MVC version 3. My logoff and logon action methods are routing to the area, and I need them to route to the normal controller that is not in an area.
I have tried the following
host://AREA/CONTROLLER/METHOD instead of host://CONTROLLER/METHOD.
@if(Request.IsAuthenticated) {
<text>Welcome <b>@Context.User.Identity.Name</b>
[ @Html.ActionLink("Log Off", "LogOff", "Account", new { area = "" }) ]</text>
}
else {
@:[ @Html.ActionLink("Log On", "LogOn", "Account", new { area = "" }) ]
}
© Stack Overflow or respective owner