Argentini.Halide.H3Controls.AnyChecked C# (CSharp) Method

AnyChecked() public static method

Determine if at least one ListItem is selected.
public static AnyChecked ( CheckBoxList listObject ) : System.Boolean
listObject System.Web.UI.WebControls.CheckBoxList List Control (like a CheckBoxList).
return System.Boolean
        public static Boolean AnyChecked(CheckBoxList listObject)
        {
            Boolean retVal = false;

            for (int x = 0; x < listObject.Items.Count; x++)
            {
                if (listObject.Items[x].Selected)
                {
                    retVal = true;
                    x = listObject.Items.Count;
                }
            }

            return retVal;
        }