ASP.NET Grid View Problem
<p>I have one gridview where I am passing the command argument as gridview row id for the Button I created for every row.</p>

<p>I want to display all the details of that row in the textbox according to the Row clicked.</p>

<pre><code>&lt;asp:GridView ID="gvCategory" runat="server" AutoGenerateColumns="false" 
              onrowcommand="gvCategory_RowCommand" &gt;
          &lt;Columns&gt;
            &lt;asp:TemplateField&gt;
              &lt;ItemTemplate&gt;
                 &lt;asp:Label ID="lblCatId" runat="server" Text='&lt;%#Eval("categoryId") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
             &lt;asp:TemplateField&gt;
              &lt;ItemTemplate&gt;
                 &lt;asp:Label ID="lblCatName" runat="server" Text='&lt;%#Eval("categoryName") %&gt;'&gt;&lt;/asp:Label&gt;
              &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:TemplateField&gt;
              &lt;ItemTemplate&gt;
                &lt;asp:Button ID="btnModify" runat="server" Text="Modify" CommandName="Modify" CommandArgument='&lt;%#Eval("categoryId") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
          &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
</code></pre>

<p>Code.....</p>

<pre><code>if (e.CommandName == "Modify")
{
     int id = Convert.ToInt32(e.CommandArgument);          
     // I want the value to assgin for the selected row here
     // I was previously fetching the data from database according id,but i want this frim the gridview of selected row.
}
</code></pre>
