This is a migrated thread and some comments may be shown as answers.

How to catch SqlError when using SqlDataSource

0 Answers 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vadim
Top achievements
Rank 1
vadim asked on 11 Apr 2011, 02:23 PM
Hello.

I use SqlDataSource as RadGrid data source (RadGridTable.DataSourceID = "SqlDS").
I configure SqlDataSource at Page_Load event (SqlDS.SelectCommand = "SELECT * ...").
If SQL Server returns an error then application crashes with unhandled exception.
How can I catch SqlException in that scenario?

Vadim.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
vadim
Top achievements
Rank 1
Share this question
or