Asp.net LinqDataSource异常

Asp.net LinqDataSource异常,asp.net,linq-to-sql,exception-handling,Asp.net,Linq To Sql,Exception Handling,要从Linq数据源捕获SQLExection,请执行以下操作: <asp:LinqDataSource ID="linq_tipo" runat="server" ContextTypeName="Linq_Clinica_Veterinaria" EntityTypeName="" TableName="tb_tipo_animals"> </asp:LinqDataSource> 在引发应用程序_Error()之前,我可以执行什么事件?捕获如下异常: pro

要从Linq数据源捕获SQLExection,请执行以下操作:

<asp:LinqDataSource ID="linq_tipo" runat="server" 
ContextTypeName="Linq_Clinica_Veterinaria" EntityTypeName="" 
TableName="tb_tipo_animals">
</asp:LinqDataSource>


在引发应用程序_Error()之前,我可以执行什么事件?

捕获如下异常:

protected void linq_tipo_Updating(object sender,
        LinqDataSourceUpdateEventArgs e) {
    if (e.SQLException != null)
    {
    //Handle the exception
        e.ExceptionHandled = true;//Set to true as you have handled the exception
    } }

类似地,您可以处理插入、删除、选择和其他事件。

No…..我在LinqDataSource之后有一个问题:如何捕获mysqlexception?哪个控制?