How to check whether the item in the combo box is selected or not in C#?
.net, c#, combobox, selecteditem
Solution
if (string.IsNullOrEmpty(ComboBox.SelectedText))
{
MessageBox.Show("Select a date");
}
Problem
I have a combo box in which I have to display the dates from a database. The user has to select a date from the combo box to proceed further, but I don't know how to make the user aware of selecting the item from the combo box first in order to proceed further. What process should be followed so that a user can get a message if he has not selected the date from the combo?