ASP.NET Core 2.1 Razor Form, Post not reaching Controller
There was a lot of different help here, thanks especially to Kirk Larklin! There were three issues that was preventing my controller from picking up the data.
Browse.cshtml was missing the @addTagHelpers... I added the following:
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, AuthoringTagHelpers
My CollectController.cs was missing a route... I added the following:
[HttpPost, ValidateAntiForgeryToken] [Route("Index/Collect")]
Finally, I renamed my controller post method from 'Collect' which conflicting with another method to Index and updated the asp-action in my Browse.CSHTML file to match.
public IActionResult Index(Collect model)
Thanks for all the help!
-Travis W