标签:style blog http ar color os 使用 sp java
转载:http://www.cnblogs.com/brusehht/archive/2009/03/19/1416802.html
常情况下,我们在使用ajax利用updatepanel实现页面局部刷新时需要有提示信息,而传统的方式是利用
Page.ClientScript.RegisterStartupScript来注册客户端脚本实现信息提示,但这种方式在ajax中不起作用,必须选择
System.Web.UI.ScriptManager.RegisterStartupScript来替代Page.ClientScript.RegisterStartupScript
例子.
public static void Show(System.Web.UI.UpdatePanel updatePanel, string msg) { ScriptManager.RegisterStartupScript(updatePanel, updatePanel.Page.GetType(), "message", "alert(‘" + msg.ToString() + "‘);", true); //page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<mce:script language=‘javascript‘ defer><!-- alert(‘" + msg.ToString() + "‘); // --></mce:script>"); }
标签:style blog http ar color os 使用 sp java
原文地址:http://www.cnblogs.com/zfanlong1314/p/4131190.html