当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net - GridView DataFormatString Doesn't Always Work

问题描述:

I have an ASP.NET 2.0 gridview displaying the results of a simple data table. The Gridview's columns are explicitly defined with one displaying the values of a decimal field. That column is set with a DataFormatString of {0:C}. When I view it on my local development machine, it outputs the values correctly (applies the currency format as expected). As soon as I deploy it to my integration server, the formatting does not apply. I have verified that the code is the same, I have verified that the database is the same. The only difference is the web server. I am running my local copy via the built-in web server in vs 2005 and the integration server is running IIS 6.0. I have other apps on the same integration server that have a gridview applying a format string with no problems.

<asp:BoundField DataField="BEGIN_BALANCE" HeaderText="Beginning Balance" DataFormatString="{0:C}">

<ItemStyle Wrap="False" HorizontalAlign="Right" />

</asp:BoundField>

On my local machine, the value 52393.59 is diplayed as $52,393.59 where as on the integration server it is display as 52393.5900.

Does anyone have any idea what I may be missing?

Thanks!

分享给朋友:
您可能感兴趣的文章:
随机阅读: