Author: kbainey1 | Posted on: 12/11/2008 2:26:00 PM | Views : 270

How can I create a validation class to check if there is null values for the following code?
if(salon.HadProductKnowldgeEduDate.HasValue)
{
dpProductKnowledgeMonth1.Items.FindByValue(salon.HadProductKnowldgeEduDate.Value.Month.ToString()).Selected = true;
}

 I have numerous amount of lines and don't want to put in if(salon. ???. HasValue) {} one hundred times.

 Also for
if (distributor.Contact2FirstName != null)
{
txtFirstName2.Text = distributor.Contact2FirstName.ToString();
}  ...

Go to the complete details ...