I have an array of string which I want to show a separate Textbox for each one of them in the View.
I tried to use it like this (which Items is of type string[]):
@foreach(var x in Model.Items) {<input asp-for="x" />}
But this does not work. I can of course go the old way:
@foreach(var x in Model.Items) {<input name="items" value="x" />}
but I want to know how to do it MVC way.
forloop andasp-for="Model[i]"(could also useasp-for=@x"since itsstring[])