c# - How to determine multiple checkboxes states -


 ucmultiple uc = new ucmultiple(); //here ucmultiple user control  contains checkbox  string strtext;     if (uc.checkbox1.checked == true)     {      strtext = checkbox1. text;     } 

how know whether multiple check boxes checked if check boxes in user controls?

to find out how many checkboxes checked can use

 uc.controls.oftype<checkbox>().where(x => x.checked).count(); 

if count greater 1 multiple checked..

if checking couple of checkboxes is better check them

if(firstcheckbox.checked && secondcheckbox.checked) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -