原因:经过研究源码发现,目前Asp.Net Core MVC不支持复杂的数据类型 源码地址: Microsoft.AspNetCore.Mvc.ViewFeatures TempDataSerializer.cs CanSerializeType
There may come a time where you want to store non string data in your site's TempData. Upon doing this you will likely be met with the following exception. Exception System.InvalidOperationException: The 'Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TempDataSerializer' cannot serialize an object...
The '[name of the property]' property with TempDataAttribute is invalid. The 'Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.TempDataSerializer' cannot serialize an object of type '[name of the property]'. If you want to use TempData to store complex types, you must serialize it to a string-...
How to force jsonserializer not to serialize null properties How to force to update JavaScript and CSS files after deploying new version MVC How to format column to text when generating excell using closedxml How to format dateTime data in @Html.DisplayFor ? How to format list into multiple co...
Problem of JsonSerializer.Serialize with different language character Problem scaffolding idenity Problem to pass multiple arguments to javascript function inside razor page! Problem to use AsNoTracking query in master-detail entities. Problem trying to Remove Auto increment from Primary key in Code first...
How to force jsonserializer not to serialize null properties How to force to update JavaScript and CSS files after deploying new version MVC How to format column to text when generating excell using closedxml How to format dateTime data in @Html.DisplayFor ? How to format list into multiple co...