asp控件UpdatePanel能够比较简单地实现局部刷新,可是,使用了这种局部刷新,相应的Response.write执行就不成功了,要用ScriptManager.RegisterClientScriptBlock3 a, ]4 \$ G8 u* C( K# Y
/ x& ~/ D' t& D: g: b2 D0 I+ ]具体例子如下:' F3 ^4 g% ]' h4 P
ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), DateTime.Now.ToString().Replace(":", " "), "alert('超时,请重新登录!');parent.window.location = '../../Login.aspx';", true);
' q2 Y# `/ a/ x; g8 ~& \! B
8 B* E6 [' V& u% A/ g3 j! {ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), DateTime.Now.ToString().Replace(":", " "), "alert('实验修改成功!')", true);
, K2 c" z B1 P8 I. `- ?等等
* _* x9 f! O+ O. @6 {; E6 C' ]9 {' I0 i4 s- Z
如果要使用,只要替换第三部分的js代码就好了。。。 |