Answers for "How to show alert message in c# code behind"

C#
1

alert message in c# windows application

string message = "Simple MessageBox";  
MessageBox.Show(message);
Posted by: Guest on September-20-2021
1

alert message in c# windows application

string message = "Do you want to abort this operation?";  
string title = "Close Window";  
MessageBoxButtons buttons = MessageBoxButtons.AbortRetryIgnore;  
DialogResult result = MessageBox.Show(message, title, buttons, MessageBoxIcon.Warning);  
if (result == DialogResult.Abort) {  
    this.Close();  
}  
elseif(result == DialogResult.Retry) {  
    // Do nothing  
}  
else {  
    // Do something  
}
Posted by: Guest on September-20-2021

Code answers related to "How to show alert message in c# code behind"

C# Answers by Framework

Browse Popular Code Answers by Language