2008年7月14日 星期一

ajax在.NET裡的alert

以前在沒有用ajax時~
要alert會這樣寫~
ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('存檔完成')", true);
但是如果你有用AJAX 的 updatepanel時,這樣寫會alert不出來。
故要改成:
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "alert", "alert('存檔完成')", true);
就ok了

沒有留言: