Reputation: 699
I have 12 check boxes and i want to be checked or unchecked these check boxes according to there database values. I want to perform this action in c# not in ASP .NET.
Upvotes: 0
Views: 55
Reputation: 1582
You can convert 0 or 1 to boolean using Convert.ToBoolean()
method:
checkBox1.Checked = Convert.ToBoolean(1); //true -- any number except for 0
checkBox1.Checked = Convert.ToBoolean(0); //false
Upvotes: 1