Solved

Catching Validation Error in ASP.Net

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I build my own IDE using ASP.NET MVC? 2 45
convert html to string 6 35
imap read mail 1 30
Winform Module - What is the ASP.Net equiv 2 23
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…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

832 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