ASP.NET mvc View with IEnumerable model and input tag helper
In this official ASP.NET Core tutorial , I can use an Input Tag Helper as shown below. But due to a known model binding issue of form elements in a foreach loop , I want to use for loop instead. Question : If I were to replace @foreach (var item in Model) with @for (int i=0; i < Model.Count(); i++) in the following View . What would be my asp-for in <input asp-for="???" /> ? For some reason, intellisense is not recognizing, e.g, Model[i].BlogId or @Model[i].BlogId @model IEnumerable<EFGetStarted.AspNetCore.NewDb.Models.Blog> @{ ViewBag.Title = "Blogs"; } <h2>Blogs</h2> <p> <a asp-controller=