AspNet GridView 模板 Bool 解析
AspNet GridView 模板 Bool 解析
模型中有一个是bool类型,现在想转换成为,正确 错误
方法如下:
<itemtemplate>
<%#(bool)Eval("stat") ? "正确":"错误"%>
</itemtemplate>
同样在,repeater 中也适用。
AspNet GridView 模板 Bool 解析
模型中有一个是bool类型,现在想转换成为,正确 错误
方法如下:
<itemtemplate>
<%#(bool)Eval("stat") ? "正确":"错误"%>
</itemtemplate>
同样在,repeater 中也适用。