Check Whether A Panel Has No Controls Inside (Is Empty)
Posted on 2012-09-06
I'm working in a VB.NET Windows project that contains a panel. The user adds records to this panel by selecting an item from a combo box outside this panel. The records get added to the panel in textboxes. When the user is done, they submit the record(s) in the panel to the database by hitting a button below the panel.
I want to check whether the user has added any records in the panel before submitting them to the database. I'm hoping to have something in the button that checks whether the panel is empty ( it has no records = no textboxes) before submitting.
Does anyone know how to check whether a panel has no controls in it?