Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
22
Answers
How to abort delete action on confirmation message box
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Dealy
14y
16.8k
1
Reply
Hello,
I have the code for deleting a record but i noticed even though user cancels the action it removes the current record from the form.
Any ideas how can i stop the action when user cancel the action on the confirmation message box?
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Delete?", "Confirm Delete", MessageBoxButtons.OKCancel) == DialogResult.OK)
MessageBox.Show("DELETE");
else
{
//Code for Cancel action
MessageBox.Show("ABORT");
}
}
Thank you in advance.
Post
Reset
Cancel
Answers (
22
)
Next Recommended Forum
Validation of textboxes
about array search