ClientScript.RegisterClientScriptBlock(this .GetType(), " onSelectedNodeChanged" ,"document.all.getElementById('" + ctrl.ClientID + "'). visible=false;" );
那如果有被UpdatePanel包起來時,使用上面的方式就會沒有任何效果!而必需改用下面的方式:
ScriptManager.RegisterStartupScript(this. Page, this.Page.GetType(), " DynamicResponseScriptBlock" +new Random().Next().ToString(), "alert('hi');", true);
沒有留言:
張貼留言