To
show alert MessageBox in Windows forms:
MessageBox.Show("Welcome
to DotNet");
To
show Confirm MessageBox with Yes No buttons in Windows forms:
DialogResult result;
result = MessageBox.Show("Are You sure want to Delete?", "Conformation", MessageBoxButtons.YesNo);
if
(result == System.Windows.Forms.DialogResult.Yes)
{
MessageBox.Show("Records Deleted Successfully");
}
else
{
MessageBox.Show("No action");
}
From
second message box if you click Yes :
No comments:
Post a Comment