.

Saturday, October 11, 2008

Show message box in ASP.NET

Show message box in ASP.NET

I've written a simple function which uses JavaScript.

private void ShowMessageBox(string Message)
{

Label lblMessageBox = new Label();

lblMessageBox.Text =

"";

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.
Message box

No comments:

.