Firstly, I'm pretty sure this is a Framework bug somewhere. Dev - works correctly
UAT - works correctly
Prod - does not work.
I have a list view The model has a bunch of properties. 7 of the properties are decimal 6 are output into text boxes, and 1 into HTML 1 of the text boxes and the HTML output the correct values The other 5 are outputting 0 instead All 7 are referenced as
<%# Eval("Property") %>
If I use
<%# ((MyClass)Container.DataItem).Value %>
I get the correct output/ If I use
<%# Eval("Value", "{0:#,##0}")%>
I get the correct output
Has anyone run across this before? If so, can you point me in the direction of a Hotfix, Bug report, etc from Microsoft about it.
I'm in need of one to clarify to the customer what is going on since the code in question hasn't changed in 18 months, and UAT and Prod are supposed to be on the same versions of everything (but I don't control that). ADDED: Also, just updated my dev box, now at 4.6.1087 and it's still working correctly there.
<asp:ListView ID="lv" runat="server" EnableViewState="False" DataKeyNames="ID" InsertItemPosition="LastItem" OnItemCommand="lv_ItemCommand">
<InsertItemTemplate></InsertItemTemplate>
<ItemTemplate>
<tr><td>
<asp:TextBox runat="server" ID="txtBAF" Text='<%# Eval("BAF")%>' /> SHOWS 0
<asp:TextBox runat="server" ID="txtBAF2" Text='<%# Eval("BAF")%>' /> SHOWS 404.0000 - correct
<%# Eval("BAF")%> SHOWS 404.0000 - correct
<%# Eval("BAF", "#,##0")%> SHOWS 404 - correct
<%: Item.BAF %> SHOWS 404.0000 - correct - if I set the ItemType property for the ListView
<%# ((MyClass)Container.DataItem).BAF %> SHOWS 404.0000 - correct
</td>
</tr>
</ItemTemplate>
</asp:ListView>