hiwater
04-09-2004, 03:14 AM
I'm getting an error (System.FormatException: Input string was not in a correct format) trying to check a currany field for zeros or not. I am using the same type of if statement that I've alway used for text fields. What format should the expression be in for an ACCESS DB currency field? Also, Is there any good only reference material for asp.net? Here is the code example of what I'm doing:
<MM:If runat="server" Expression='<%# (rsStore.FieldValue("UnitCost", Container) <> "0") %>'>
<ContentsTemplate> <span class="ProductListItem">[b]Unit Cost:</b></span> <span class="ProductListItem">
<%# Double.Parse(rsStore.FieldValue("UnitCost", Container)).ToString("C") %> [b]</span></ContentsTemplate>
</MM:If>
<MM:If runat="server" Expression='<%# (rsStore.FieldValue("UnitCost", Container) <> "0") %>'>
<ContentsTemplate> <span class="ProductListItem">[b]Unit Cost:</b></span> <span class="ProductListItem">
<%# Double.Parse(rsStore.FieldValue("UnitCost", Container)).ToString("C") %> [b]</span></ContentsTemplate>
</MM:If>