London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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?