title: Get Current row from Gridview in ASP.NET
body: <p>I have a Gridview with delete and edit buttons looks like</p>
  
  <pre><code>&lt;asp:GridView ID="grdTrackedItems" runat="server" AutoGenerateColumns="False" Width="330px"
              BorderStyle="None" OnRowDataBound="OnRowDataBoundTrackedItems" OnRowDeleting="OnRowDeletingTrackedItems"&gt;
              &lt;Columns&gt;
                &lt;asp:TemplateField HeaderText="Name"&gt;
                  &lt;ItemTemplate&gt;
                    &lt;asp:Label ID="lblItem" runat="server" Text='&lt;%# Eval("Item") %&gt;' /&gt;
                  &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField&gt;
                  &lt;ItemTemplate&gt;
                    &lt;asp:ImageButton ID="imgDelete" runat="server" ImageUrl="~/Resources/Images/Delete.png"
                      Height="12" Width="12" ToolTip="Delete" CommandName="Delete" /&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;ItemStyle Width="22px" /&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField&gt;
                  &lt;ItemTemplate&gt;
                    &lt;asp:ImageButton ID="imgEdit" runat="server" ImageUrl="~/Resources/Images/Edit.png"
                      Height="12" Width="12" ToolTip="Edit" /&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;ItemStyle Width="22px" /&gt;
                &lt;/asp:TemplateField&gt;
              &lt;/Columns&gt;
            &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I have a text box and Save button on bottom of the page. I want to display the item name in the textbox when I click on the edit button from gridview. How can I do this?</p>