title: Trigger to refresh DataView when user clicks a button inside an UpdatePanel
body: <p>We have the following code in an UpdatePanel.</p>
  
  <pre><code> &lt;asp:UpdatePanel 
      ID="UpdatePanelSearch" 
      runat="server" 
      UpdateMode="Conditional"&gt;
  
      &lt;ContentTemplate&gt; 
          &lt;p&gt;Parent Search:
              &lt;asp:TextBox ID="TextBoxSearch" runat="server" Width="207px"&gt;&lt;/asp:TextBox&gt;
              &lt;asp:Button ID="ButtonSearch" runat="server" Text="Search" /&gt;
          &lt;/p&gt;
      &lt;/ContentTemplate&gt;
   &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>The code in the VB file looks like this to handle clicking the Search button so a GridView will display data based on the value entered into the TextBox.</p>
  
  <p>The GridView is also in a separate UpdatePanel:</p>
  
  <pre><code>Protected Sub ButtonSearch_Click(sender As Object, e As EventArgs) Handles ButtonSearch.Click
  
      GridViewParentsSummary.DataSource = theTableAdapter.GetData(strSearchText)
  End Sub
  </code></pre>
  
  <p>We would like to create a trigger to update the GridView if that is the correct thing to do here. </p>
  
  <p>Here is the GridView:</p>
  
  <p></p>
  
  <pre><code>    &lt;ContentTemplate&gt; 
          &lt;asp:GridView
              ID="GridViewParentsSummary" 
              runat="server" 
              AllowPaging="True" 
              AllowSorting="True" 
              AutoGenerateColumns="False" 
              DataKeyNames="ID" 
              PageSize="3"
              &gt;
  
              &lt;Columns&gt;
  
                  &lt;asp:BoundField 
                      DataField="FatherName" 
                      HeaderText="Father's Name" 
                      SortExpression="FatherName" /&gt;
  
                  &lt;asp:BoundField 
                      DataField="MotherName" 
                      HeaderText="Mother's Name" 
                      SortExpression="MotherName" /&gt;
  
                  &lt;asp:ButtonField 
                      ButtonType="Button" 
                      CommandName="Select" 
                      Text="Select This Parent" /&gt;
              &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>Can you show the needed code required to make the correct trigger that will refresh the GridView?</p>