To make a confirmation box in c# windows application we can use
MessageBox.Show(string text,string caption,MessageBoxButtons buttons)
Coding :
if (MessageBox.Show(”Do you want to delete?”, “Confirm delete”,MessageBoxButtons.YesNo) == DialogResult.Yes)
{
MessageBox.Show(”Deleted”);
}
{
MessageBox.Show(”Deleted”);
}
In the above coding when a button delete is clicked a condition is checked and confirmation box “Do you want to delete” is arised with two buttons ‘Yes’ and ‘No’.If ‘Yes’ is clicked then another message box “Deleted” is showed.
Popularity: 14% [?]
Related posts:

October 21st, 2008
admin
Posted in
Tags: 
