ASP.NET AJAX下alert弹出对话框

定义:

protected void ajaxMessage(Control control, string message)
{
	ajaxMessage(control, message, "click");
}

protected void ajaxMessage(Control control, string message, string key)
{
	ScriptManager.RegisterClientScriptBlock(control, this.GetType(), key, "alert('" + message + "')", true);
}

   
使用:

 ajaxMessage(UpdatePanel1, "ASP.NET AJAX下alert弹出对话框!");

 

posted on 2010-12-31 15:20  Apull  阅读(11)  评论(0)    收藏  举报  来源