Button inside Update Panel is not triggered, in asp.net

前端 未结 1 436
失恋的感觉
失恋的感觉 2021-01-20 19:18

<         


        
1条回答
  •  借酒劲吻你
    2021-01-20 19:42

    Change the UpdatePanel's ChildrenAsTriggers property to true. This will cause any postbacks triggered by the UpdatePanel's child elements to update its content.

    EDIT: Just realized that btn_Add is a nested control, so you will have to explicitly call it out as an UpdatePanel Trigger. Add the following to your UpdatePanel markup, after the ContentTemplate:

    
         
    
    

    EDIT #2: To keep your modal popup from closing when an async postback occurs, move the UpdatePanel inside the panel specified by ModalPopupExtender's PopupControlID:

    
        
            
                
                
                
                
                
                 
            
        
    
    

    0 讨论(0)
提交回复
热议问题