如何保持母版页中面板的滚动位置? [英] how to maintain scroll position of a panel in master page?

查看:79
本文介绍了如何保持母版页中面板的滚动位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个母版页,其中在asp.net面板中有一个Treeview.问题在于,每当页面回发时,滚动位置都会重置为开始状态,但是我需要使其保持不变.树视图的位置应保持不变,展开形式的节点也应处于展开形式,而折叠形式的节点即使在回发之后也应处于折叠形式.请帮忙!!!!请记住,树视图控件在母版页中.谢谢!!

Hi everybody,
I have a master page where there is a treeview which is inside an asp.net panel. The problem is that, everytime the page goes postback, the scroll position is reset to the beginning state, but i need it to remain unchanged. The position of the treeview should remain unchanged as well as the nodes in expanded form should be in expanded form as well as the ones in collapsed form should be in collapsed form even after the postback. Please help!!!! Remember that the treeview control is in the master page. Thank you!!

推荐答案

要保持滚动位置,请看以下文章:
http: //weblogs.asp.net/hosamkamel/archive/2007/09/07/maintain-scroll-position-after-postbacks-in-asp-net-2-0.aspx [ http://www.c-sharpcorner.com/uploadfile/yogesh12/postback12292006050702am/postback.aspx [ ^ ]
http://csharpdotnetfreak.blogspot.com/2011/08/maintain-scroll-position- postback.html [ ^ ]
http://www.4guysfromrolla.com/articles/111704-1.aspx [ ^ ]

对于回发后仍保留树视图状态:
http://forums.asp.net/t/1506616.aspx [ http://stackoverflow.com/questions/11128310/asp- net-treeview-keep-the-same-state-post-postback [
For maintaining scroll position, have a look at following article:
http://weblogs.asp.net/hosamkamel/archive/2007/09/07/maintain-scroll-position-after-postbacks-in-asp-net-2-0.aspx[^]
http://www.c-sharpcorner.com/uploadfile/yogesh12/postback12292006050702am/postback.aspx[^]
http://csharpdotnetfreak.blogspot.com/2011/08/maintain-scroll-position-postback.html[^]
http://www.4guysfromrolla.com/articles/111704-1.aspx[^]

For persisting treeview state after a postback:
http://forums.asp.net/t/1506616.aspx[^]
http://stackoverflow.com/questions/11128310/asp-net-treeview-keep-the-same-state-after-postback[^]


这篇关于如何保持母版页中面板的滚动位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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