1
Vote

Add method for checkbox controls that accepts a boolean parameter to determine if the checkbox should be checked or not to improve support for dynamic boolean values

description

Add method for checkbox controls that accepts a boolean parameter to determine if the checkbox should be checked or not to improve support for dynamic boolean values.
 
bool checkbox1Checked = DataAccess.checkbox1Checked;
 
CUITe_HtmlCheckBox checkbox1 = new CUITe_HtmlCheckBox("Id=checkbox1");
checkbox1.SetCheck(checkbox1Checked);
 
This eliminates having to write the condition:
 
if (checkbox1Checked)
checkbox1.Check();
else
checkbox1.UnCheck();

comments