How to handle exceptions with the new datasource controls

G

Guest

Ok, the new .net 2.0 allows us to bind a server control to a data source
without writing a line of code.

Now, what happens if there is a problem accessing the data source and an
exception is thrown, how do we handle that?, there is no code to insert a try
catch block nor the controls allow to set functionality.

In .net 1.1, whenever we attempted to connect to a database we would do it
in a try catch block, where we could either try to solve the problem or at
least inform the use that something has happened, but how do you do that with
a datasource control?

For example a sqldatasource, what if the binding fails? what if the database
server is not available for example?
 
M

Mr Newbie

I dont have 2005 here, but surely there are exceptions classes for use with
this control
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top