<asp:CheckBox ID="txtIsPaid" runat="server" autopostback="true" OnCheckedChanged="txtIsPaid_CheckedChanged" />
protected void txtIsPaid_CheckedChanged(object sender, EventArgs e) { if (txtIsPaid.Checked == true) { EmployeeLeave empleave = new EmployeeLeave(); empleave.IsPaid = Convert.ToBoolean(txtIsPaid.Text); } }