I am working with a details view form and have added some code to warn the user they have clicked on the Delete Button. However, if they realise they do not want to delete the record and click on the "No, (don't let me do it)" button, it stills deleted the record. How do I make my "No" button work?
I am working with Visual Basic, with a SQL database.
'This is what I have...
Private Sub BindingNavigatorDeleteItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem1.Click
Dim result As New DialogResult
result = MessageBox.Show("Confirm Delete", "Delete Database", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
If result = DialogResult.Yes Then