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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -