Changing Html.DisplayFor boolean checkbox MVC

前端 未结 3 1672
一向
一向 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

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-12 07:40

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

提交回复
热议问题