You can supply the area
in the routeValues
parameter. Try this:
return RedirectToAction("LogIn", "Account", new { area = "Admin" });
Or
return RedirectToAction("LogIn", "Account", new { area = "" });
depending on which area you’re aiming for.
More Related Contents:
- Using System.ComponentModel.DataAnnotations with Entity Framework 4.0
- Multiple models in a view
- Polymorphic model binding
- ViewModel with List and editor templates
- Can we pass model as a parameter in RedirectToAction?
- Replace line break characters with in ASP.NET MVC Razor view
- ASP.Net MVC Html.HiddenFor with wrong value
- CheckboxList in MVC3 View and get the checked items passed to the controller
- Add CSS or JavaScript files to layout head from views or partial views
- How to use Ajax.ActionLink?
- Writing/outputting HTML strings unescaped
- ASP.NET MVC – How to Preserve ModelState Errors Across RedirectToAction?
- How to render a Section in a Partial View in MVC3?
- Razor-based view doesn’t see referenced assemblies
- ASP.NET: This method cannot be called during the application’s pre-start initialization stage
- Troubleshooting anti-forgery token problems
- Do I need to install MVC 3/4 on web server to run mvc application
- How to create controls dynamically in MVC 3 based on an XML file
- Fat model / thin controller vs. Service layer [closed]
- Set disable attribute based on a condition for Html.TextBoxFor
- Is there any attribute relating to AJAX to be set for ASP.NET MVC controller actions?
- Custom Authorize Attribute
- Inject repository to custom membership provider with Ninject
- How can I use Html.Action?
- Castle Windsor Dependency Resolver for MVC 3
- Having difficulty using an ASP.NET MVC ViewBag and DropDownListfor
- How to create a function in a cshtml template?
- Razor ViewEngine HTML.Checkbox method creates a hidden input. Why? [duplicate]
- How do I create a MVC Razor template for DisplayFor()
- View Model IEnumerable property is coming back null (not binding) from post method?