I am working in asp.net mvc application.
During the initial load of my view, my controller returns a list which has some decimal? properties in it. Say one account has amount = 31.56 and other account has amount = 30.00. I am doing a lot of jquery stuff in my UI to bind these items do some computations using account.amount.
There is a print data button that submits the form data by ajax post, I have a class that got inherited from ValueProviderFactory which converts the data that has been posted during submit and converts them in to a DictionaryValueProvider()
The reason for doing this is to get my ViewModel to bind the DictionaryValueProvider() values.
My view model say AccountListViewModel has List property. It is also an argument in my printdata action in print controller.
I get all my post data to be mapped to AccountListViewModel.List property. But the problem is decimal values like 31.56 gets mapped correctly to Accounts.Amount where as a value of 30.00 maps to Accounts.Amount as null.
I dont know whats going wrong? and why this is happening?
Unable to post the code. Any thoughts or comments would be appreciated?