S
sebastien1101
I have an errorprovider in a tabControl
i use this to validating all field required
Private Sub Champs_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles txtSociete.Validating,
txtAdresse.Validating, txtCodePostal.Validating, txtVille.Validating
Dim monControl As TextBox = CType(sender, TextBox)
If (monControl.Text.Trim().Length = 0) Then
ErrorProvider1.SetError(monControl, "Merci de renseigner ce
champ.")
Else
ErrorProvider1.SetError(monControl, "")
End If
End Sub
===>> my problem : When i click the submit button... (and my requiered
fields are empty) nothing stop me...!!!
Why ?
i use this to validating all field required
Private Sub Champs_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles txtSociete.Validating,
txtAdresse.Validating, txtCodePostal.Validating, txtVille.Validating
Dim monControl As TextBox = CType(sender, TextBox)
If (monControl.Text.Trim().Length = 0) Then
ErrorProvider1.SetError(monControl, "Merci de renseigner ce
champ.")
Else
ErrorProvider1.SetError(monControl, "")
End If
End Sub
===>> my problem : When i click the submit button... (and my requiered
fields are empty) nothing stop me...!!!
Why ?