Trapping SQLException on a DataBound control

  • Thread starter Thread starter Larry Bud
  • Start date Start date
L

Larry Bud

I can trap general errors on a datasouce. For example, on an Inserted
event:

If e.Exception IsNot Nothing Then
e.ExceptionHandled = True
'do stuff here
End If


But how do I trap specific SQL errors on a databound control?
 
Hi Larry,

I think, you can catch the exception or handle the exception in the
respective events for the GridView databound control like if you want to
catch the exception while updating then you can catch it on Gridview_updated
event.

Regards,
Manish
www.ComponentOne.com
 
Back
Top