I have a link button on my aspx page in 1.1 that allows a user to delete a row, but i need to put in a confirmation, I tried a javascript version, but it shows the popup but still deletes the record, how can I change this to work correctly.
Private Sub myDataGrid_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles myDataGrid.ItemCommand
Dim MobId As String = e.Item.Cells(0).Text
If (e.CommandName = "Delete") Then
RegisterClientScriptBlock("showMessage", "<script language=""JavaScript""> confirm('This will delete this UIC and all associated Records.'); </script>")
sql = "Delete from tblUnitDeployData where intUnitMobId = " & MobId & " go Delete from tblUnitPostion where intUnitMobId = " & MobId "
End If
insertUpdateDelete(sql)
DatagridFill()
End Sub