2017-04-23 86 views
2

我想从HTML页面下面打印3个3;问题是@ a.Invoice.TotalAmount在一个数字之后拖动4个额外的零,例如到12,它显示为12.0000到18.54,它显示18.5400和11.1为11.1000。在打印HTML页面时正在添加额外的零

<tr> 
     <td style="width: 50%; text-align: left; font-size: 12px;">@a.Invoice.InvoiceVendor.Name</td> 
     <td style="font-size: 12px;">@a.Invoice.InvoiceNumber</td> 
     <td style="font-size: 12px;">@a.Invoice.TotalAmount</td> 
    </tr> 

当我调试代码(html)页面零不显示。 enter image description here

但是当我打印它是未来网页与尾随零

enter image description here

我担心的是我小数点后不需要零。有什么建议吗?

谢谢。

+0

什么数据类型,您使用的? – gmalenko

+0

我不知道“@a”是什么。另外,我没有看到任何C#或JavaScript代码,但是它被标记为C#和JavaScript。我也不知道“打印页面”是什么意思;目前尚不清楚“打印”是指HTML还是别的。 – user34660

回答