Question ValidationSummary in code behind

raysefo

Well-known member
Joined
Jul 21, 2010
Messages
207
Programming Experience
Beginner
Hi,

Is there a way to manage validation summary in code behind? I m adding errors like below:

VB.NET:
If Not (TextBox6.Text.Contains(TextBox5.Text)) Then
            TextBox6.Text += TextBox5.Text + ";"
        Else
            Dim val As CustomValidator = New CustomValidator
            val.IsValid = False
            val.ErrorMessage = " error message!"
            Me.Page.Validators.Add(val)
        End If
 

Latest posts

Back
Top