Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
I think "StartPage" instead of "StartPageController"...?
using (Html.BeginForm("Login", "StartPage", FormMethod.Post))
Hi,
Add Route using the initialization module and give it a try
[InitializableModule]
[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
public class MVCRoutesInitializationModule : IInitializableModule
{
public void Initialize(InitializationEngine context)
{
MapRoutes(RouteTable.Routes);
}
private void MapRoutes(RouteCollection routes)
{
routes.MapRoute(null, "login", new { controller = "StartPage", action = "Login" });
}
public void Uninitialize(InitializationEngine context)
{
//Add uninitialization logic
}
}
I need to add a small form with a textfield for email and login button, in the site header in the _Root.cshtml.
I tried to post from it to an action defined in the StartPageController, but it doesn't work, I get 404. What the best way to implement this?