Hi All,
In one of my actions I set a hidden view data Object:
Setting in the Controller:
declaration in the view:Code:IEnumerable<ComputerBreakdownRiskViewModel.CoverType> coverFlatData = _gridService.PopChildGrid(RiskID, PolicyZoneID, SectionID);
ViewData["GridValues"] = coverFlatData;....
On a call from my view back to my controller I attempt to pass the viewdata Value:Code:@Html.Hidden("GridValues", ViewData["GridValues"])
Back in my controller action I make the signature:Code:......Update("_SaveAjaxEditing", "ComputerBreakdownRisk", new { ViewData["GridValues"], Model.Covers });
I declare it as IEnumerable since this was the type that I set the ViewData up with, however i Receive the following error:Code:public ActionResult _SaveAjaxEditing(int Id, IEnumerable<ComputerBreakdownRiskViewModel.CoverType> GridValues, ComputerBreakdownRiskViewModel.CoverType cover)
{....
Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.
