Can't get the text value of linkbutton in gridview <p>This is my markup:-</p> <pre><code> &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="245px" onrowcommand="GridView1_RowCommand" &gt; &lt;Columns&gt; &lt;asp:TemplateField&gt; &lt;ItemStyle BackColor="#CCCCCC" ForeColor="Black" Width="250px" HorizontalAlign="Center" BorderStyle="None" /&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton ID="userList" runat="server" CommandName="Select" CommandArgument ='&lt;%# Container.DataItemIndex %&gt;' Text='&lt;%# Bind("users") %&gt;'&gt;&lt;/asp:LinkButton&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; </code></pre> <p>And in the codebehind, I am trying to get the current row's text value, but can't seem to get it;</p> <p>it returns "".</p> <pre><code> protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { int rowValue = Convert.ToInt32(e.CommandArgument.ToString()); GridView1.SelectedIndex = rowValue; string test = GridView1.SelectedRow.Cells[0].Text; } </code></pre>