How to handle exception?
Hi,
I have a asp.net 2.0 page which uses objdatasource of which the business object is a TableAdapter object. In the page, all database related operation is done by GridView. Issues come out that when user perform an illegal database insert or update (such as inserting a null value), the exception is thrown out to the page, which is unfriendly.
How can program to catch exception and show friendly in the page?
try
'your code
catch objExeption as Exception (or as )
'the code in case of an exception
'for example response.redirect("friendly page")
end try
hope it helps
Labels: ado, asp, business, database, exception, handle, net, objdatasource, object, page, related, tableadapter
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home