-
CheckBox
I have a checkbox within a repeater which is extracting value from the database. My code snippet it like this in code behind section
Code:
<asp:CheckBox runat="server" Text = '<%#((DataRowView)Container.DataItem)["Description"]%>'
Checked = '<%#((DataRowView)Container.DataItem)["Permission"]%>' == 0 ? true : false
In the green line the permission is a bit value coming from database. I want the checkbox to be checked if its 1 and uncheck if its zero. But I am unable to get the correct syntax :(. Can someone tell me that ??
-
Re: CheckBox