I have an asp form that contains a delete button. When the user clicks the delete button, I want to prompt the user to confirm that they really do want to delete the record.
In windows vb coding I would use the following:
Dim mResponse As String
mResponse = MsgBox("ARE YOU SURE you want to PERMANENTLY REMOVE this record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
If mResponse = 7 Then
'do delete here...
How do I do this type of confirmation in asp coding? Would like to add it to the vb Code Behind section in the btnDelete Click event. Here is that code:
Protected Sub btnDelete_Click(sender As Object, e As System.EventArgs) Handles btnDelete.Click
'(Want to put the prompt here...)
DataSource_CWDW_Retail.DeleteCommand = "DELETE ReportRecipients WHERE RecipientEmail = '" & Trim(txtEmailAddress.Text) & "'"
gridStoresRetailSummary.SelectedIndex = -1
Thank you for the help