c# - Html.DisplayFor with boolean value -
why @html.displayfor()
boolean value display either disabled checkbox or disabled select (depending on nullable or not) insead of true/false/nothing?
with string, instance, don't disabled textbox.. value. why difference?
most probably, because checkbox
doesn't need culture-dependent: don't have translate true/false/nothing in every possible language. it's more easy library authors maintain...etc.
that being said, can of course override default behavior. see example using razor, how make "bool?" properties appear yes/no/not set on details pages?
Comments
Post a Comment