2013-03-25 50 views
0

在Treeview中單擊節點時,我在後面的代碼中構造HTML並將其加載到我的文字控件中。我不希望每次點擊樹視圖控件中的任何節點來獲取數據以便以文字顯示時加載頁面。我該如何避免回傳? 我嘗試使用treeview左右的updatepanel,如下所示,現在數據不會在單擊不同節點時發生變化,並且不存在回發。我該如何解決這個問題?asp.net中Treeview控件的更新面板不工作?

      <table> 
           <tr> 
            <td valign="top"> 
             <asp:UpdatePanel ID="UP_HealthCon_Ddl_Conditions" runat="server"> 
              <contenttemplate> 
             <asp:TreeView ID="Tree_Index" NodeWrap="false" Style="font-size: 11px; font-family: Tahoma; font-weight: bold; text-align: left;" runat="server" Width="10px" EnableClientScript="False"> 
             </asp:TreeView> 
             </contenttemplate> 
             </asp:UpdatePanel> 
            </td> 
           </tr> 
          </table> 


          <table> 
           <tbody> 
            <asp:Label ID="litSPName" runat="server" Font-Bold="true"></asp:Label> 
            <br /> 
            <br /> 
            <asp:Literal ID="lit_basic_Result" runat="server"></asp:Literal> 
           </tbody> 
          </table> 

回答

0

將contenttemplate和updatepanel添加到我的表中,它工作!