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