The ASP statement looks like this:
adjmargin = Math.round(((mysell - mycost) / mycost)*100)
In the Razor View I am looping through multiple fields and I need to apply the above operation to a couple of them. So for instance I have some fields like this:
<td>
@Html.DisplayFor(x => x.Cost)
@Html.HiddenFor(x => x.Cost)
</td>
<td>
@Html.DisplayFor(x => x.Sell)
@Html.HiddenFor(x => x.Sell)
</td>
I'm assuming I'm going to have to assign the data from DisplayFor or HiddenFor to a variable and utilize those vars in a math function but I can't quite figure out what approach to take.