开发者

How to show values from resources for a boolean BoundField

开发者 https://www.devze.com 2023-03-09 13:58 出处:网络
In a GridView, how to show in a boolean BoundField value from resources for each value (true, false).

In a GridView, how to show in a boolean BoundField value from resources for each value (true, false).

For example: If the value is true开发者_如何学Go then show "Value a" (from resources) else then show "Value B".


Better to make it Template field and then do like...

<asp:Label ID="lbl" runat="server" <%# Eval("ColumnName") == true ? 
Resources.GlobalRes.KeyNameA : 
Resources.GlobalRes.KeyNameB  %> ></asp:Label>
0

精彩评论

暂无评论...
验证码 换一张
取 消