Storing and retrieving a decimal from TempData
I want to store a decimal in TempData
. I read in the documentation that it’s not possible to store a decimal, the same way you can store an int for example. I’ve tried every possible combination of storing and retrieving, but the error is always the same – "The 'Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.DefaultTempDataSerializer' cannot serialize an object of type 'System. Decimal'."
.