2010-03-08 41 views
1

我有我的形式設計爲的UpdatePanel和ModalPopup擴展

<asp:Panel runat="server" Id="xyz"> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> 
     <ContentTemplate> 

      'Gridview with edit/delete - opens detailsview(edit template) with data 
      for editing 

     </ContentTemplate>     
    </asp:UpdatePanel> 

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> 
     <ContentTemplate> 

      'Hyperlink to open detailsview(insert template) for inserting records 

     </ContentTemplate>     
    </asp:UpdatePanel> 

</asp:Panel> 
<asp:Panel runat="server" Id="xyz1"> 
'Ajax modal popup extender control 
</asp:Panel> 

它完美,當我點擊更新,插入交替, 但是當我點擊插入超鏈接(這是外面的GridView)和關閉/取消彈出無任何插入,然後再次單擊插入它不會調用insert_onclick事件。它工作,如果我點擊其他按鈕,然後單擊此按鈕。什麼可能導致這個問題,我該如何解決它?

回答

2

我解決了它。在插入超鏈接我設置CausesValidation =假,它工作。我在彈出窗口中需要字段驗證器,並且它們導致問題。