2010-03-08 3 views
1

나는 내가 업데이트를 클릭 교대 를 삽입 할 때 완벽하게 작동 UpdatePanel 및 ModalPopup Extender를

<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를 다시 클릭하면 insert_onclick 이벤트가 호출되지 않습니다. 다른 버튼을 클릭하고이 버튼을 클릭하면 작동합니다. 이 문제의 원인은 무엇이며 어떻게 해결할 수 있습니까?

답변

2

해결했습니다. 하이퍼 링크를 삽입 할 때 CausesValidation = False로 설정하면 작동합니다. 나는 필드 검증기를 팝업에 넣고 문제를 일으키는 곳을 요구했다.