MessageBox.Show("your message",
"window title",
MessageBoxButtons.OK,
MessageBoxIcon.Warning // for Warning
//MessageBoxIcon.Error // for Error
//MessageBoxIcon.Information // for Information
//MessageBoxIcon.Question // for Question
);
MessageBox.Show("text", "title", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show("Some text", "Some title",
MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Content", "Title", MessageBoxIcon.Error)
//MessageBox.Result
DialogResult result = MessageBox.Show("Do you like cats?", "Yes or No?", messageBoxButtons.YesNoCancel);
if (result == DialogResult.Yes)
;
else if (result == DialogResult.No)
;
else
;
DialogResult result = MessageBox.Show("Do you want to save changes?", "Confirmation", MessageBoxButtons.YesNoCancel);
if(result == DialogResult.Yes)
{
//...
}
else if (result == DialogResult.No)
{
//...
}
else
{
//...
}
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true);