maintainScrollPositionOnPostback=“true” does not work globally after setting in web.config ,but works in page level,what should I do?

左心房为你撑大大i 提交于 2019-12-02 08:02:56

问题


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.


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/2084229/maintainscrollpositiononpostback-true-does-not-work-globally-after-setting-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!