I am having trouble getting my custom controllers to behave properly in an Umbraco MVC site. I can't work out how to pass custom models and use custom ActionResults. When I try to send a form the method is not being called. So a method like this
public ActionResult Home(string username, string password)
{
Debug.WriteLine("form");
var company = new Company();
return CurrentTemplate(company);
}
that should be called from a form like this but nothing happens.
@using (Html.BeginForm("Home","Login", FormMethod.Post, new {name = "logon"}))
{
<label>User name </label><input type="text" id="username"/><br/>
<label>Password </label><input type="password" id="password"/><br/>
<input type="submit" value="Here"/>
}
I know it is possible to override the default controller but is there any point in doing so?