1. 如何让页面回发(PostBack)后,滚动条位置保持不变?
在页面后台代码的Page_Load事件中,添加如下代码:
this
.Page.MaintainScrollPositionOnPostBack
=
true
;
上面的代码在.net1.1中等价于
this
.Page.SmartNavigation
=
true
;
2. 如何在IE中让文本框刷新之后还保持原值
<
HTML
>
< HEAD >
< META NAME ="save" CONTENT ="history" >
< STYLE >
.saveHistory{behavior:url(#default#savehistory);}
</ STYLE >
</ HEAD >
< BODY >
< INPUT class =saveHistory type =text id =oPersistInput >
</ BODY >
</ HTML >
< HEAD >
< META NAME ="save" CONTENT ="history" >
< STYLE >
.saveHistory{behavior:url(#default#savehistory);}
</ STYLE >
</ HEAD >
< BODY >
< INPUT class =saveHistory type =text id =oPersistInput >
</ BODY >
</ HTML >