阅读背景:

更改Html.DisplayFor布尔复选框MVC

来源:互联网 

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's boolean. If I change DisplayFor() to DisplayTextFor() then it will just display True or false instead of checkbox. How can I change True and false to 'Active' and 'Inactive' where Active is true and Inactive is false?I have a boolean property IsActive. In the view




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: