Solved

Catching Validation Error in ASP.Net

Posted on 2011-09-30
1
464 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Footer for each row on Gridview 2 41
ASP.net Moving Visual Studio 2015 project to 2017 2 41
Web page design problem 3 18
asp.net repeater 2 16
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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