Posted on: 2/9/2014 8:19:19 PM | Views : 453

protected void validateExistsUsers(object source, ServerValidateEventArgs args) { DateTime DateOfBirth = new DateTime(Convert.ToInt32(txtYear.Text.Trim()), Convert.ToInt32(ddlMonth.SelectedValue), Convert.ToInt32(ddlDay.SelectedValue)); var ExistsUsers = (from c in db.tbl_UsersProfiles where c.FirstName == txtFirstName.Text.Trim() && c.SurName == txtSurname.Text.Trim() && c.DateOfBirth == DateOfBirth select c); if (ExistsUsers.Count() == 0) { args.IsValid = true; } else { args.IsValid = false; } } Is possible to check with button1 if above code = arg.IsValid=true?

Go to the complete details ...