Venkata Subbareddy

Venkata Subbareddy

  • 999
  • 770
  • 99.4k

converting falied on boolean value

Jun 2 2015 11:00 AM
  Hi All , Iam geeting  small error let know where iam doing Wrong.
 
<asp:CheckBox ID="chkStatus" runat="server"
Checked='<%# Convert.ToBoolean(Eval("ApproveStatus")) %>'
Text='<%# Eval("ApproveStatus").ToString().Equals("True") ? " Approved " : " Not Approved " %>' />
 
 
 
ERROR
Object cannot be cast from DBNull to other types. 

Answers (1)