4
Reply

Please how can i validate this block

Christian Nwamba

Christian Nwamba

Sep 3 2013 3:38 PM
987
private void button1_Click(object sender, EventArgs e)
        {
           
         
           resultBindingSource1.DataSource = from result in ds.Results where result.REGISTRATION_NUMBER == textBox1.Text && result.EXAM_YR == comboBox1.SelectedItem select result;
         
           

        }

The above code works perfectly when i click button1 to to filter the datasource.

Please i need an error message box to pop up if the textbox and combobox are empty or the values are incorrect

Thanks

Answers (4)