Hi I am trying to submit parent and children, I am able to submit the Parent fine but not the children, is there any way to do this ?
this is my code.
@model IECWeb.Models.CurrencyDay
using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<legend>CurrencyDay</legend>
<div class="editor-label">
@Html.LabelFor(model => model.CurrencyDate)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.CurrencyDate)
@Html.ValidationMessageFor(model => model.CurrencyDate)
</div>
<p />
<table>
<tr>
<th>Currency</th>
<th>Rate</th>
</tr>
@foreach (var item in Model.Currency) {
<tr>
<td>
<div class="editor-field">
@Html.EditorFor(model => item.Name)
@Html.ValidationMessageFor(model => item.Name)
</div>
</td>
<td>
<div class="editor-field">
@Html.EditorFor(model => item.Rate)
@Html.ValidationMessageFor(model => item.Rate)
</div>
</td>
</tr>
}
</table>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
When I submit I get the CurrencyDay object But not the list of Currency
Thanks sushiBite.