ASP.NET,AJAX 's UpdatePanel 中使用Page.ClientScript.RegisterStartupScript 失败
直接使用 System.Web.UI.ScriptManager.RegisterStartupScript(Control control, Type type, string key, string script, bool addScriptTags) 就可以了.
如:
System.Web.UI.ScriptManager.RegisterStartupScript(Page, Me.GetType(), "MyScript", "alert('Are you sure.');", True)
本文介绍在ASP.NET的AJAX UpdatePanel中如何正确使用StartupScript方法来注册客户端脚本。通过使用System.Web.UI.ScriptManager提供的RegisterStartupScript方法,可以有效地解决在UpdatePanel内注册脚本的问题。

2654

被折叠的 条评论
为什么被折叠?



