I've written a simple function which uses JavaScript.
private void ShowMessageBox(string Message)
{
Label lblMessageBox = new Label();
lblMessageBox.Text =
"<script language='javascript'>" + Environment.NewLine +
"window.alert('" + Message + "')</script>";
Page.Controls.Add(lblMessageBox);
}
To call out the message box, just write this:
ShowMessageBox("Hello world!");
The problem with this is that I can't customize the message box. I can only pass in the message as parameter, but not changing the title, the button text or image.