Full postback triggered by LinkButton inside GridView inside UpdatePanel

前端 未结 8 859
余生分开走
余生分开走 2020-12-02 13:22

I have a GridView inside of a UpdatePanel. In a template field is a button I use for marking items. Functionally, this works fine, but the button always triggers a full page

8条回答
  •  不知归路
    2020-12-02 13:44

    MSDN specifies that the UpdatePanel.ChildrenAsTriggers property "[g]ets or sets a value that indicates whether postbacks from immediate child controls of an UpdatePanel control update the panel's content" (see http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.childrenastriggers.aspx).

    Since your LinkButton does not appear to be an "immediate child control," then I would recommend configuring your LinkButton as an explicit AsyncPostBackTrigger.

    Below your tag, try adding this:

    
      
    
    

提交回复
热议问题