maintainScrollPositionOnPostback=“true” does not w

2019-03-03 05:44发布

setting maintainScrollPositionOnPostback="true" globally in web.config does work in my xp sp3 under iis 5.1 but not for production server(win server 2003 sp2 with .NET 3.5 sp1 and IIS 6).

but if add MaintainScrollPositionOnPostback="true" for any <%@ Page directive it is working like a champ.

I don't know if I should add clear tag for web.config to override it in IIS 6 or something?

Any Advice,tips or comments would be Appreciated

here is the related section in web.config

<pages maintainScrollPositionOnPostBack="true" validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false" >
  <controls>
     ....       
  </controls>
</pages>

--------update---------

I don't know what was the real problem then when i post the question ,right now i have no problem with maintainScrollPositionOnPostback=“true” in my new system with windows 7.

3条回答
乱世女痞
2楼-- · 2019-03-03 06:31

Hey i found solution on Javascript file

Just add in your header file after jquery library

I think this will resolve your problem its works perfect for me.

查看更多
在下西门庆
3楼-- · 2019-03-03 06:41

I had similar problem. But after inspecting markup found out problem was with one of the update panel. Check update panels if you have similar problem.

查看更多
我命由我不由天
4楼-- · 2019-03-03 06:42

might be a problem with case sensitivity - try maintainScrollPositionOnPostback (lowercase m)

查看更多
登录 后发表回答