<asp:TemplateField HeaderText="是否审核" SortExpression="verification">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%#Eval("verification")true?'是':'否'%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>结果显示:'>

解决方案 »

  1.   

       <asp:TemplateField HeaderText="是否审核" SortExpression="verification" >                           
                               
                                <ItemTemplate> 
                                 <asp:Label ID="Label1" runat="server" Text= <%#(bool)Eval("verification")?"是" : "否"%>> </asp:Label>                                                       
                                </ItemTemplate> 
                                
                                
                            </asp:TemplateField> 
      

  2.   


    <asp:TemplateField HeaderText="是否审核" SortExpression="verification">
                                <ItemTemplate>
                                   
     <%# Eval("verification").ToString()=='true' ? "是" : "无"%>
                                </ItemTemplate>
                            </asp:TemplateField>
    试试
      

  3.   

    public static bool GetISpan(object pic)
        {
          接收数,然后判断
            return "~/User/" + pic.ToString();
        }
    <asp:Label ID="Label1" runat="server" Text='<%#GetISpan(Eval("verification"))%>'> </asp:Label> 
      

  4.   

    <asp:TemplateField HeaderText="是否审核" SortExpression="verification"> 
                                <ItemTemplate> 
                                    <asp:Label ID="Label1" runat="server" Text=' <%#Eval("verification")%>'> </asp:Label> 
                                </ItemTemplate> 
                            </asp:TemplateField> 在RowDataBind事件中if(e.Row.RowType==DataControlRowType.DataRow)
    {
       Label lbl_verification=e.Row.FindControl("Label1") as Label;
      if(lbl_verification.Text.Trim().ToUpper()=="TRUE"}
      {
         lbl_verification.Text="是";
      }else
      {
       lbl_verification.Text="否";
       }   
    }