public void alert(string msg, string url = )
{
string js = alert(' + msg + ');;
if (url != )
js += location.href=' + url + ';;
ScriptManager.RegisterClientScriptBlock((Page)HttpContext.Current.Handler, typeof(string), js, js, true);
}
private void 開啟遮罩()
{
ScriptManager.RegisterClientScriptBlock((Page)HttpContext.Current.Handler, typeof(string), "js", "openpop();", true);
//ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", "openpop();", true);
}
private void 關閉遮罩(string msg = "")
{
string js = "closepop();";
if (msg != "")
{
js += "alert('" + msg + "');";
}
ScriptManager.RegisterClientScriptBlock((Page)HttpContext.Current.Handler, typeof(string), "js", js, true);
//ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "js", js, true);
}
文章標籤
全站熱搜
