I am trying to essentially render a "listing" of records with the ability to edit each line record. I am doing something wrong in assigning my Function() in the @HtmlHelper extensions. I am trying to use the out-of-the-box scaffolding as a guide. Here's my simplified HTML code:
@ModelType IEnumerable(Of Models.Affiliate.ProspectEvent)
<div>
<table class="table">
<tr>
<th> @Html.DisplayNameFor(Function(model) model.EventDate) </th>
<th> @Html.DisplayNameFor(Function(model) model.Details) </th>
</tr>
@For Each item In Model
@Using (Html.BeginForm())
@Html.AntiForgeryToken
@<tr>
<td> @Html.TextBoxFor(Function(modelItem) item.EventDate) </td>
<td>
@Html.TextAreaFor(Function(modelItem) item.Details, 5, 50, Nothing)
</td>
<td> <input type="submit" class="btn btn-sm btn-default" value="Save" /> </td>
</tr>
End Using
Next
</table>
</div>
When the formdata gets back to the controller, it is prefixed with "$VB$Local_item". I can filter out the prefix in the controller with Prefix:="$VB$Local_item",... but I know that my problem is in the "Function(modelItem)" in the HTML and that's where it needs to be fixed, but I can't figure out what to use. I know that I should know this but I don't. Any direction would surely be appreciated.