2015-05-04 33 views
0

如何停止UpdatePanel當我點擊鏈接按鈕導致整個頁面回發?如何停止UpdatePanel時,我單擊鏈接按鈕從導致整個頁面回發

的UpdatePanel代碼:你的UpdatePanel控件

<asp:UpdatePanel ID="panel_update" runat="server" UpdateMode="Conditional"> 
    <ContentTemplate> 
    <asp:Label ID="comment_sub" runat="server" Text='<%#Eval("review_headline") %>/> 

    <asp:Repeater ID="repeat" runat="server" OnItemDataBound="repeat_ItemDataBound" > 
     <HeaderTemplate> 
     <div class="top_review"> 
      <h3>TOP REVIEWS</h3> 
      <a class="view_all">View all reviews(<%=top_view%>)</a> 
     </div> 
     </HeaderTemplate> 
     <ItemTemplate> 
     <asp:Label ID="lblSubject" runat="server" Text='<%#Eval("commented_by") %>' Font-Bold="true" /> 
    </ContentTemplate> 
    <Triggers> 
    <asp:AsyncPostBackTrigger ControlID ="link1" EventName="Click" /> 
    <asp:AsyncPostBackTrigger ControlID ="link2" EventName="Click" /> 
    <asp:AsyncPostBackTrigger ControlID ="link3" EventName="Click" />              
    </Triggers>   
</asp:UpdatePanel> 
+0

當我點擊鏈接按鈕中繼器只刷新整個頁面的帖子回來。如何解決這個問題 – prakash

+3

你添加了asp:ScriptManger嗎?如果是,則在其中設置EnablePartialRendering =「true」。 – Mairaj

+0

是的,我添加了asp:ScriptManger並且啓用了EnablePartialRendering =「true」也是bt的一切回帖 – prakash

回答

0

設置ChildrenAsTriggers = 「真」。關閉標籤更新面板應該是

相關問題