I'm a beginner with ASP MVC and I'm trying to show data from a model in a view. This is how I display the data :
@Html.DisplayFor(modelItem => item.Budget_Year)
But I don't know how to use this data, for example I tried to round up this result and I tried naively :
@{
double test = (modelItem => item.Budget_Year);
test = System.Math.Round(test , 2);
}
But I can't use it like that : Cannot convert lambda expression to type 'double' because it is not a delegate type
Someone can explain me how to use this different items from my model in my view ?
Best regards,
Alex