jbenson001
Programmer
I have a question for you gurus....
I am confused in error handling in 2.0. For example, in 1.1, lets say you have a simple page, with a datagrid bound to a dataset. You can use the wizard to create the dataadapter, dataset and connection objects. Then the code is simple ..
Very simple and straight forward, and easy to implement the Try..Catch.
However, the question comes in using 2.0. You now drop a gridview on the page, and create a datasource and configure it and run the page. No coding involved. This is great, but how would you implement a Try...Catch since you cannot access the partial class? What if something goes wrong during the page_load, during binding? How do you trap error like this to display a message, instead of the ugly awakward defautl page?
And ideas?....
Thanks...
Jim
I am confused in error handling in 2.0. For example, in 1.1, lets say you have a simple page, with a datagrid bound to a dataset. You can use the wizard to create the dataadapter, dataset and connection objects. Then the code is simple ..
Code:
If Not IsPostBack Then
Try
sda1.Fill(ds)
datagrid1.databind
Catch ex as Exception
..do something ...
End Try
End If
However, the question comes in using 2.0. You now drop a gridview on the page, and create a datasource and configure it and run the page. No coding involved. This is great, but how would you implement a Try...Catch since you cannot access the partial class? What if something goes wrong during the page_load, during binding? How do you trap error like this to display a message, instead of the ugly awakward defautl page?
And ideas?....
Thanks...
Jim