using System;
using System.Web;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
namespace PublicClass
{
public static class AlertClass
{
#region 弹出对话框
///
/// 弹出提示信息
///
///
///
public static void Alert(Page objPage, string message)
{
string key = "AlertMessage";
string script = string.Format("alert('{0}');", message);
objPage.ClientScript.RegisterStartupScript(typeof(Page), key, script, true);
}
///
/// 弹出是否提示信息
///
///
///
public static void Confirm(Page objPage, string message)
{
string key = "AlertMessage";
string script = string.Format("confirm('{0}');", message);
objPage.ClientScript.RegisterStartupScript(typeof(Page), key, script, true);
}
#endregion
#region 弹出对话框并且跳转页面
/// 显示“确定”,点击以后就转到预设网址的提示框
///
/// 提示信息
/// “确定”以后要转到预设网址
/// 提示框JS
public static void Alert(string strMsg, string URL)
{
string StrScript;
StrScript = ("");
System.Web.HttpContext.Current.Response.Write(StrScript);
}
///
/// 是否提示信息
/// “确定”以后要转到预设网址
/// 提示框JS
public static void Confirm(string strMsg, string URL)
{
string StrScript;
StrScript = ("");
System.Web.HttpContext.Current.Response.Write(StrScript);
}
#endregion
}
}