vb System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.ExceptionHandled类(方法)实例源码

下面列出了vb System.Web.UI.WebControls.LinqDataSourceStatusEventArgs.ExceptionHandled 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Web.UI.WebControl   
Protected Sub LinqDataSource_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LinqDataSourceStatusEventArgs)
    If (IsNothing(e.Exception)) Then
        Dim newProduct As Product
        newProduct = CType(e.Result, Product)
        Literal1.Text = "The new product id is " & newProduct.ProductID
        Literal1.Visible = True
    Else
        LogError(e.Exception.Message)
        Literal1.Text = "We are sorry. There was a problem saving the record. The administrator has been notified."
        Literal1.Visible = True
        e.ExceptionHandled = True
    End If
End Sub


问题


面经


文章

微信
公众号

扫码关注公众号