Asp.net-mvc – MVC Html.BeginForm using Areas

asp.net-mvchtml-helper

I'm using MVC areas and on a view that's in an area called "Test" I would like to have a form that posts to the following method:

area: Security
controller: AccountController
method: logon

How can I make this happen with Html.BeginForm? Can it be done?

Best Answer

For those of you that want to know how to get it to work with the default mvc4 template

@using (Html.BeginForm("LogOff", "Account", new { area = ""}, FormMethod.Post, new { id = "logoutForm" }))