public void MessageBox(string Message, System.Web.UI.Page page, bool IsClose)
{
Type cstype = page.GetType();
if (IsClose)
{
page.ClientScript.RegisterStartupScript(cstype, "MessageBox", string.Format("<script>alert('{0}');top.window.opener=null;top.window.close();</script>", Message));
}
else
{
page.ClientScript.RegisterStartupScript(cstype, "MessageBox", string.Format("<script>alert('{0}');</script>", Message));
}
}
{
Type cstype = page.GetType();
if (IsClose)
{
page.ClientScript.RegisterStartupScript(cstype, "MessageBox", string.Format("<script>alert('{0}');top.window.opener=null;top.window.close();</script>", Message));
}
else
{
page.ClientScript.RegisterStartupScript(cstype, "MessageBox", string.Format("<script>alert('{0}');</script>", Message));
}
}