How
I directly pass the checkbox value to database as a bit:
cmd.Parameters.Add("@isapproved", SqlDbType.Bit).Value =
chkbox.Checked;
OR
bool isapproved= checkbox.checked;
cmd.Parameters.Add("@isapproved", SqlDbType.Bit, isapproved ? 1:0).Value = isapproved;
|
|
|
No comments:
Post a Comment