Programming for Everybody: Can I convert a boolean to Yes/No in a ASP.NET GridView

Can I convert a boolean to Yes/No in a ASP.NET GridView

 <asp:TemplateField HeaderText="الحالة" SortExpression="status">
    <ItemTemplate><%#IIf(Boolean.Parse(Eval("status").ToString()), "passed", "Failed")%></ItemTemplate>
</asp:TemplateField>

No comments:

Post a Comment