How to check whether the item in the combo box is selected or not in C#?

前端 未结 1 879
没有蜡笔的小新
没有蜡笔的小新 2021-02-15 01:16

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 u

1条回答
  •  北荒
    北荒 (楼主)
    2021-02-15 01:47

    if (string.IsNullOrEmpty(ComboBox.SelectedText)) 
    {
     MessageBox.Show("Select a date");
    }
    

    0 讨论(0)
提交回复
热议问题