asp控件UpdatePanel能够比较简单地实现局部刷新,可是,使用了这种局部刷新,相应的Response.write执行就不成功了,要用ScriptManager.RegisterClientScriptBlock6 D# q6 D A; _" j' b" S
% I7 Y9 H9 G/ i具体例子如下:
" f% u4 F7 d+ nScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), DateTime.Now.ToString().Replace(":", " "), "alert('超时,请重新登录!');parent.window.location = '../../Login.aspx';", true);
! A. F, S' d2 u" F+ ~
" I! ?) S( `; O/ R& O3 ?+ XScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), DateTime.Now.ToString().Replace(":", " "), "alert('实验修改成功!')", true); s$ E: _" \6 h, @2 V
等等; t8 i2 P. `& u1 W
/ j( w" P6 v5 `6 w, y如果要使用,只要替换第三部分的js代码就好了。。。 |