title: Creating a Login Page in ASP.NET Core MVC
body: <p>I am trying to create a login page. But it's saying no page found.</p>
  <p>I have included this in <code>Startup.cs</code>:</p>
  <pre><code>app.UseEndpoints(endpoints =&gt;
  {
      endpoints.MapControllerRoute(
          name: &quot;default&quot;,
          pattern: &quot;{Controller=LoginController}/{action=Login}&quot;);
  });
  </code></pre>
  <p>The <code>Login.cshtml</code> page is in views as <code>Views/Login/Login.cshtml</code>
  and the controller lies under the Controllers folder with the name <code>LoginController.cs</code>
  The code for <code>LoginController.cs</code>:</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Mvc;
  
  namespace AdminControl.Controllers
  {
      public class LoginController : Controller
      {
          // POST: LoginController
          [HttpPost]
          public IActionResult Login()
          {
              return View();
          }
  
      }
  }
  </code></pre>
  <p><code>Login.cshtml</code>:</p>
  <pre><code>&lt;form asp-action=&quot;Users/Index&quot; class=&quot;form-group&quot; id=&quot;login-form&quot; method=&quot;post&quot; runat=&quot;server&quot; style=&quot;text-align: center;&quot;&gt;
      &lt;input class=&quot;form-control&quot; placeholder=&quot;ID&quot; runat=&quot;server&quot; style=&quot;text-align: center;&quot;/&gt;
      &lt;input class=&quot;form-control&quot; placeholder=&quot;Password&quot; runat=&quot;server&quot; style=&quot;text-align: center;&quot; type=&quot;password&quot;/&gt;
  &lt;/form&gt;
  
  &lt;button class=&quot;btn btn-info&quot; form=&quot;login-form&quot; value=&quot;Submit&quot; type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
  </code></pre>
  <p>What has gone wrong?</p>