Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How format values in ienumerable View model in .net core mvc?

$
0
0
@Html.DisplayFor(modelItem => item.vouchertype == "P" ? "Paid" : "Receipt")&

@Html.DisplayFor(modelItem => item.dated.ToString("dd-MMM-yy"))

trying to format the value but error occurs :

Template can use only with field access, property access, single dimension array index or single parameter custom indexer experssions.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>