如何保持树状态? [英] How to maintain treeview state?

查看:84
本文介绍了如何保持树状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

i正在使用asp.net web应用程序,我需要保存树视图的状态,即如果用户扩展了treeview节点,它在点击时应该保持展开状态。

如何在不同文件夹中的母版页中保持这种状态?

例如

hello,
i am working on asp.net web application , where i need to save the state of the treeview i.e if user expands treeview nodes, it should remain expanded when clicked.
How to maintain such state across master pages in different folders?
e.g

-Home
   - Chapter1
       Section1
       Section2
   + Chapter2
+Features
+Articles
 
When I clicked on Section1 Link,the Treeview should remain open with same State
and should not get closed like fig below

-Home
   + Chapter1
   + Chapter2
+Features
+Articles

推荐答案

树形视图在回发时自动加载(当新页面加载时)。

默认情况下它会丢失其状态
treeview loads automatically on postback(when new page loads) .
By default it looses its state


这篇关于如何保持树状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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