Solved

Catching Validation Error in ASP.Net

Posted on 2011-09-30
1
460 Views
Last Modified: 2012-05-12

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

Open in new window

0
Comment
Question by:jongrossex
1 Comment
 

Accepted Solution

by:
jongrossex earned 0 total points
ID: 36893367
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now