请问在母版页里使用了树形控件,动态加载菜单来导航时,如何做才能使点击树形菜单节点链接时,只让子页面区域刷新,而不让树形菜单改变现实状态???现在遇到的问题是,树形控件作为用户控件来使用的,然后在母版页里使用,子页面区域用来显示点击树菜单节点时显示的内容。但是如果展开树菜单点击时,在加载子页面的同时,母版页也跟着同时加载了一次,因为树控件在母版页里使用,所以树控件也同时加载了一次,故造成树菜单由原来的展开状态,又回复到初始状态(默认折叠的)。这样致使操作起来很不方便。请问有什么方法可以改善这种显示效果吗?我想要的是,无论怎样点击树菜单,在子页面区域显示内容,但是树菜单始终保持原状而不刷新重新加载。请各位大仙帮一帮在下,有什么的好的方法,不吝赐教!

解决方案 »

  1.   

    母板页中<table style="width: 1024px; position: relative; height: 768px; left: 0px; top: 0px; border-collapse:collapse; padding:0px 0px 0px 0px" border="0" cellspacing="0" cellpadding="0" width=100% height=100%>
                <tr style="height:120px">
                    <td colspan="3" style="background-color: aliceblue;" >
                        <div id="TopDiv"style="width:100%; height:100%; background-color:Red"> 
                            
                        </div>
                    </td>
                </tr>
                <tr style="height:628px">
                    <td id="menuBar" style="width:189px;">
                    <iframe id="Frame_left" name="leftFrame" style="height: 102%; visibility: inherit;
                        width: 100%; z-index: 1" scrolling="auto" frameborder="0" src="left.aspx"></iframe>
                    </td>
                    <td style="width:10px;">
                                        <div style="cursor:hand; background-color:Gray; height:102%">
                            <div style="cursor:hand; margin-top:280px; background-color:Gray;" onclick="showMenuBar();">点此隐藏</div>
                        </div>
                     </td>
                    <td id="menuing">
                    <iframe id="right" name="right" style="height: 100%; visibility: inherit; 
                        width: 100%; z-index: 1" scrolling="auto" frameborder="0" src="right.aspx" ></iframe>
                    </td>
                </tr>
                <tr style="height:20px">
                    <td colspan="3">
                     <div id="bottonDiv"style="width:100%; height:40px; background-color:Red">底部</div>
                    </td>
                </tr>
            </table>
    框架的左右页面记得在后台写,不然有处突:
    protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                tvShow.Target = "right";
            }
        }
      

  2.   

    以前我发现这个用TreeView 做不到,加了Ajax 控件也不行,一直没有找到解决方法,不过用框架的方法就可以了
      

  3.   

    如果是想让TreeView展开Expanded=true;就可以了
    但不刷新是不行的。要么使用柜架
      

  4.   

    谢谢各位的热心帮助,我打算用iframe来做了。