Thursday, December 5, 2024

Convert boolean to Yes or no in Grid view in asp.net

 <asp:TemplateField HeaderText="Active" SortExpression="Active">

    <ItemTemplate><%# (Boolean.Parse(Eval("Active").ToString())) ? "Yes" : "No" %></ItemTemplate>
</asp:TemplateField>

No comments:

Post a Comment