I have a custom hierarchical data source based on the msdn example (http://msdn.microsoft.com/en-us/library/system.web.ui.hierarchicaldatasourcecontrol.aspx). An event can be raised in the DataSourceView. If that occurs, I want to display a message on the web page.
The example is that I have a page with a TreeView control which uses a custom hierarchical datasource. If the user selects a node that they are not allowed to select, the underlying datasource will throw and error.
I want to capture this and add a message to the page. The Page_Error event is raised, but there are no eventargs.
Anybody know how to capture such an event?
An alternative approach, although not quite specific enough, is to set a flag during the datasource load event (indicating the datasource is loading) and test for this flag in the Page_Error routine.
View Complete Post