Hi i need to round up to Zero Value (end value to be 0, like 450, 55000, 4560). Hi i want to round up the value with ending zero eg if i got value like 102498 means 102500 and if i got value like 47504 means 47500 this i have to do in mvc
eg values
999 =>1000
994=>990.
995=>990
I want to round up the value and end value is zero of each one
My View Code
| Test Name | Total hrs | Rate/Hr | Margin | Discount | Total Cost | Total Cost With Discount | Remarks | |
|---|---|---|---|---|---|---|---|---|
| @item.TestName | @item.TotalHours | @item.PerHourRate | @item.Margin) | @item.Discount) | @{double totamt = item.PerHourRate * item.TotalHours; totRC += totamt; totamt += totamt * item.Margin * 0.01; totCost += totamt; } @Math.Round(totamt) | @{double totamtWithDisc = totamt - (totamt * item.Discount * 0.01); totWithDisc += totamtWithDisc; } @Math.Round(totamtWithDisc) | @item.Remarks |
In the above table i have to round off the **TOTAL COST VALUE** .Please any one understand my issue help me to resolve this issue.Thanks.

Farhan AhmedRank #73 · 25K reputationPosted Jul 17, 2020, 4:40 AM EDT
@Math.Round(model=>model.totamt, 2)https://stackoverflow.com/questions/31355350/how-to-round-off-value-in-mvc-4-into-to-two-decimal-placeshttps://stackoverflow.com/questions/6120375/limit-to-2-decimals-in-textboxfor/6121625#6121625Atul WaradeRank #1,357 · 1.2K reputationPosted Jul 17, 2020, 6:50 PM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Jul 17, 2020, 7:51 PM EDT