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 :




Very informative and well-explained tutorial.The ASP.NET-tutorial concepts are easy to understand, and the examples are helpful for beginners. Great learning resource!Learn ASP.NET-tutorial.
ReplyDelete