I would like to ask, how can I bind an array in Asp.NET Core MVC ?
<input type="text" asp-for="Requests[@index].Name" />
It was working very well in older versions of ASP MVC. This example shows "Internal server error".
"An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately."
ViewModel class example:
public class ViewModel
{
public List<Model> Requests {get;set;}
}
Model class example:
public class Model
{
public string Name {get;set;}
}
How it should work ? After you submit a form with these inputs, MVC should automaticly create and map the list in ModelView. That's how It works in ASP.NET MVC 4.