title: Button submit not working with HTTP post action, already subscribed to action in razor page
body: <p>I have a Asp.net MVC controller class called OrdersController that has an HttpPost Action method called Create(). Then I have a View page called Create.cshtml that uses razor syntax and subscribes to the action event at the bottom of the razor page. </p>
  
  <p>But whenever i press my button, nothing happens, nothing is sent to my server, no error, no loading, nothing. </p>
  
  <p>Could someone take a look at my Create() Action method and my razor Create.cshtml page and tell me if I did something wrong or missed something please? </p>
  
  <p>this is my create method</p>
  
  <pre><code>    // POST: Orders/Create
          [HttpPost]
          [ValidateAntiForgeryToken]
          public ActionResult Create(OrderViewModel collection)
          {
              try
              {
                  var order = new Order()
                  {
                      OrderTime = DateTime.Now
                  };
                  order.LocationId = collection.LocationId;
                  order.CustomerId = collection.CustomerId;
                  order.OrderTotal = 0;
                  for (var i = 0; i &lt; collection.Products.Count; i++)
                  {
                      if (collection.Products[i].Checked)
                      {
                          order.OrderTotal += collection.Products[i].Price *      collection.AmountItems[i].QuantityBought;
                      }
                  }
                  order.Items = new List&lt;OrderItem&gt;();
  
                  var orderItem = new OrderItem();
  
                  //adding order items
                  for(var i=0; i&lt;collection.Products.Count;i++)
                  {
                      if(collection.Products[i].Checked)
                      {
                          orderItem.QuantityBought =collection.AmountItems[i].QuantityBought;
                          orderItem.OrderItemNum = i;
                          orderItem.ProductId = collection.Products[i].ProductId;
                          orderItem.Price = collection.Products[i].Price;
                          order.OrderItems.Add(orderItem);
                      }
                  }
  
                  OrdRepo.AddOrder(order);
                  foreach(var item in order.OrderItems)
                  {
                      OrdRepo.AddOrderItem(item);
                  }
  
                  return RedirectToAction(nameof(Index));
              }
  
              catch
              {
                 return View();
              }
          } 
  </code></pre>
  
  <p>below is my razor page, i subscribe to my Create event near the bottom   of it</p>
  
  <pre><code>    @model HardwareStore.WebUI.Models.OrderViewModel
  @{
      ViewData["Title"] = "Create";
  }
  
  &lt;h1&gt;Create Order&lt;/h1&gt;
  &lt;form asp-action="Create"&gt;
      &lt;div class="form-group"&gt;
          &lt;label asp-for="LocationId" class="control-label"&gt;Location&lt;/label&gt;
          &lt;select asp-for="LocationId"
                  asp-items="@(new SelectList(Model.Locations,"LocationId", "Name"))" class="form-control"&gt;&lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label asp-for="CustomerId" class="control-label"&gt;Customer&lt;/label&gt;
          &lt;select asp-for="CustomerId"
                  asp-items="@(new SelectList(Model.Customers,"CustId", "FirstName"))" class="form-control"&gt;&lt;/select&gt;
      &lt;/div&gt;
      &lt;div&gt;
          @Html.LabelFor(model =&gt; model.Products)
          &lt;br&gt;
          @for (var i = 0; i &lt; Model.Products.Count; i++)
          {
              @Html.HiddenFor(m =&gt; Model.Products[i].ProductId)
              @Html.HiddenFor(m =&gt; Model.Products[i].ProductName)
              @Html.HiddenFor(m =&gt; Model.Products[i].Description)
              @Html.HiddenFor(m =&gt; Model.Products[i].Price)
              @Html.CheckBoxFor(m =&gt; Model.Products[i].Checked)
              @:&amp;nbsp;
              @Model.Products[i].ProductName
              @:&amp;nbsp;
              @Html.EditorFor(m =&gt; Model.AmountItems[i].QuantityBought)
              @Html.HiddenFor(m =&gt; Model.AmountItems[i].OrderItemNum)
              &lt;br /&gt;
          }
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;input type="submit" value="Create" class="btn btn-primary" /&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  
  @section Scripts {
      @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
  }
  </code></pre>