You could put some code in the SelectedIndexChanged() event of the listbox and query the index that the user selected, then allow / disallow selection as needed.