Detect for multiple values in a ComboBox.
Author: DevASP
Download Source Code : 311_ComboBox.zip
This article is about how to detect for multiple values in a ComboBox control.
ComboBox control is combination of two controls the TextField and ListBox. So ComboBox have the functionality of both controls TextBox as well as the ListBox control
- Steps you will do.
- Start visual studio and create a new window application.
- Set the following properties of the Form control.
- Drop a ComboBox control on the Form and set the following properties.
- Drop a TextField and set the following properties.
- Drop a Button control and set its following properties.
- Drop a Lablel control on the form. Set its Text property to “”.
- Drop a ErrorProvider Control to the designer and set its name to “errorMessage”.
Your application design has been completed. Now write the following code in the click event of the button to add the textbox value in the ComboBox.
· Write the following function to display the error message.