I am trying to call my .cs method in client side to set the Checked attribute of asp:checkbox. My checkbox control is as follows:
<asp:CheckBox ID="chkStatus" runat="server" Checked='<%# ProcessEntityStatus(Eval("Deleted"))%>' Text="Active" Enabled="false" />
Code behind method:
public bool ProcessEntityStatus(bool value)
{
if (!value)
{
return true;
}
else
{
return false;
}
}
It doesn’t work. Can any one help me please.
Modify your code like this and see if it helps.