I am trying to add dictionary values in the View, Following is my Code :-
public class TO
{
public int EmployeeId { get; set; }
public int EmployeeName { get; set; }
public Dictionary<string, double> Dic1 { get; set; }
public Dictionary<string, double> Dic2 { get; set; }
}
View :-
@model List<Models.TO>
@for (int i = 0; i < @Model.Count; i++)
{
@Html.HiddenFor(m => m[i].EmployeeId)
@Html.HiddenFor(m => m[i].EmployeeName)
....
@Html.HiddenFor(m => m[i].Dic1, Value = "") // Psuedo
}
As i have assigned values to EmployeeId & EmployeeName which i get in POST method in the Controller, How to assign values to Dictionary?