title: Gridview hyperlink click event refresh ajax update panel
body: <p>How can i do that, when i click on ID in Gridview1 which i make like hyperlink field to refresh only Ajax Update Panel, not all page? What i need in code?</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
      DataKeyNames="id" DataSourceID="SqlDataSource1" CellPadding="4" 
      ForeColor="#333333" GridLines="None" 
      onselectedindexchanged="GridView1_SelectedIndexChanged" Width="232px"&gt;
      &lt;AlternatingRowStyle BackColor="White" /&gt;
      &lt;Columns&gt;
          &lt;asp:CommandField ShowSelectButton="True" /&gt;
          &lt;asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /&gt;
  
          &lt;asp:HyperLinkField 
    DataTextField="id" 
    DataTextFormatString=" {0}" 
    DataNavigateUrlFields="id" HeaderText="id"
    DataNavigateUrlFormatString="WebForm1.aspx?ID={0}"   /&gt;
      &lt;/Columns&gt;
  </code></pre>
  
  <p>This is the code for Update Panel, where when i click on ID in GridView1 refresh Update Panel with Gridview2:</p>
  
  <pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
  &lt;/asp:ScriptManager&gt;
  &lt;br /&gt;
  &lt;asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"&gt;
  
      &lt;ContentTemplate&gt;
          &lt;asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
              DataSourceID="SqlDataSource2"&gt;
              &lt;Columns&gt;
                  &lt;asp:BoundField DataField="id_proba" HeaderText="id_proba" 
                      SortExpression="id_proba" /&gt;
                  &lt;asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /&gt;
              &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
          &lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" 
              ConnectionString="&lt;%$ ConnectionStrings:ProbaConnectionString %&gt;" 
  
          &lt;/asp:SqlDataSource&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>