如何在回发中维护页面上下自动滚动 [英] How to maintain page up and down auto scroll in postback

查看:101
本文介绍了如何在回发中维护页面上下自动滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了动态控件并将其添加到面板控件中,该控件在更新面板中退出,我已经对每个动态控件textchange事件进行了计算,但是我的问题是当它回发时,我失去了面板的焦点,页面滚动向上,我想保持我当前的页面位置,希望我的问题是对的.
感谢

I have create dynamic controls and added it in panel control which exits inside a update panel ,i have done calculations with every dynamic controls textchange event but my problem is when it get postback i lost the focus from the panel and page get scroll up,i like to maintain my current page position where i am ,hope my question is right .
Thanks

推荐答案

是的,该页面具有一个称为MaintenanceScrollPositionOnPostback的属性.将其设置为true. http://msdn.microsoft.com/en-us/library/system.web.ui.page.maintainscrollpositiononpostback.aspx [ ^ ]
Yes, the page has a property called MaintainScrollPositionOnPostback. Set that to true. http://msdn.microsoft.com/en-us/library/system.web.ui.page.maintainscrollpositiononpostback.aspx[^]


这篇关于如何在回发中维护页面上下自动滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆