Christian Nwamba

Christian Nwamba

  • NA
  • 234
  • 75.1k

Please how can i validate this block

Sep 3 2013 3:38 PM
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)