I have been adding the ability to delete multiple items in a ListView for a while now. One thing that has been bugging me though was the user could click the button to delete the selected items even if no items were selected which would popup a delete confirmation. If the user clicked yes, then a post back would occur and be confusing.
Whenever a checkbox is checked or un-checked the function checkButtonStatus() is run. The function is also run on document ready. The function takes care of checking whether the button should be enabled or not.