jongrossex
asked on
Catching Validation Error in ASP.Net
Trying to figure out where to catch validation exception.
I have a asp.net web form that has a formView control that is connected to a LinqDataSource control. Created a partial class to do the validation (see below). When the exception is thrown I cannot figure out where to catch it.
I expected to find and event on the LingDataSource control. I am new to using databound controls/data source controls so I am hoping this is a very easy.
Partial Public Class User
Private Sub OnUser_NameChanging(value As String)
If value.Contains("jon") Then
Throw New Exception("jon is not valid")
End If
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.