create MessageBox in asp.net

create MessageBox in asp.net
----------------------------

1)create class MessageBox




public class MessageBox
{

public void MyMessageBox(string message)
{
HttpContext.Current.Response.Write("<script LANGUAGE='JavaScript' >alert('"+message+"')</script>");
}
}



2) Use it In your aspx.cs Page



// write this in your button command event or where you want to use messagebox in cs file

MessageBox msgbox=new MessageBox();
msgbox.MyMessageBox("Hello");