How do I override DisplayFor boolean?

后端 未结 5 1247
醉话见心
醉话见心 2021-01-01 12:36

How do i create a display template so i can display a bool as Yes or No not a checkbox? Using mvc3

<%: Html.DisplayFor(model => model.SomeBoolean)%>         


        
5条回答
  •  清酒与你
    2021-01-01 13:31

    @Html.DisplayTextFor(model => model.SomeBoolean).

    Use the in-built DisplayTextFor() instead on DisplayFor().

    This is an old post, but I was having trouble finding a current answer.

提交回复
热议问题