Trapping SQLException on a DataBound control

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?
 
M

Manish

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top