<td>@item.recharge_reward_rate.ToString("F2")%</td> @*保留小数两位*@ <td>@item.recharge_reward_rate.ToString("0.00")%</td> @*保留小数两位*@ <td>@item.recharge_reward_rate.ToString("0.000")%</td> @*保留小数三位*@
对于可为空的decimal可用
<h2>@string.Format("{0:0}", Model.LimitBidInfo.Amount)</h2> <h2>@string.Format("{0:0.0}", Model.LimitBidInfo.Amount)</h2> <h2>@string.Format("{0:0.00}", Model.LimitBidInfo.Amount)</h2>