Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound
'dbclick to delete
If ((e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Or (e.Item.ItemType = ListItemType.SelectedItem)) Then
e.Item.Attributes.Add("ondblclick", "javascript:if(confirm('delete " + e.Item.Cells(1).Text + "?')==true) {document.Form1.hidden1.value='delete test';window.Form1.submit();}")
End If
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
if document.Form1.hidden1.value="delete test" then
'delete record in database
end if
end sub