Hey is it possible to set Dictionary<int, double>
values in view?
For now I'm tried one example that looks like this:
@for (int i = 0; i < Model.Certificates.Count; i++)
{
<tr>
<td>@Model.Certificates[i].Text</td>
<td><input type="hidden" name="@Model.Dictionary.ElementAt(i).Key" value="@Model.Certificates[i].Value" /></td>
<td><input name="@Model.Dictionary.ElementAt(i).Value"/></td>
</tr>
}
But I'm getting this kind of error:
NullReferenceException: Object reference not set to an instance of an object.