I am working on a Windows application in C#

I have two text boxes, to be validated with (txtFirstName and txtLastName)

Please could someone give me the syntax to use txtFirstName_Validating()
TO achieve the validation.
I have put the validation code inside the Button click event.

Please could you give me the best approach to validate the text boxes.

Thank you,
-----------------------------------------------------------------------

private void txtFirstName_Validating(object sender, CancelEventArgs e)
{
if (string.IsNullOrEmpty(txtFirstName.Text))
{
MessageBox.Show("First Name required!");
}

}

private void btnLookUp_Click(object sender, EventArgs e)
{
if ((txtFirstName.Text == string.Empty) || (txtLastName.Text ==
string.Empty))
{
MessageBox.Show("Please enter the Name..");
}

}