Changing Html.DisplayFor boolean checkbox MVC

前端 未结 4 1108
生来不讨喜
生来不讨喜 2021-02-12 07:30

I have a boolean property IsActive. In the view is a list of objects with their properties (including IsActive). But in the list the IsActive is a non-editable checkbox since it

4条回答
  •  南旧
    南旧 (楼主)
    2021-02-12 08:01

    This is a old question, but this might help someone. I had the exact same problem and solved with @(IsFooBar ? "Yes" : "No").

提交回复
热议问题