A MessageBox class used in ASP.NET
Author:Eve Cole
Update Time:2009-06-30 15:42:29
/// <summary>
/// Custom information dialog box
/// </summary>
public class MessageBox
{
/// <summary>
/// Define a web page to display user-defined error message
/// </summary>
System.Web.UI.Page p;
/// <summary>
/// When using an instance, the parameter is: this, such as: MessageBox MB=new MessageBox(this);
/// </summary>
/// <param name="Page">This parameter is: this</param>
public MessageBox(System.Web.UI.Page Page)
{
p=Page; //Create page
}
/// <summary>
/// Show dialog box
/// </summary>
/// <param name="message">Prompt message</param>
public void Show(string message)
{
string script="<script> alert('"+ message +"')</script>";
p.Response.Write(script);
}
}