
Imports System
Imports System.Data



Class InsertFormVB
    Inherits Page


    Protected Sub DetailsView1_ItemCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewCommandEventArgs) Handles DetailsView1.ItemCommand
        If (e.CommandName = "Insert") Then
            ClientScript.RegisterClientScriptBlock(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted')", True)
        Else
            ClientScript.RegisterClientScriptBlock(Page.GetType(), "mykey", "CancelEdit();", True)
        End If
    End Sub
End Class