How to hide a textbox control when clicking on a linkbutton where these both are child controls to gridview?
<p>I have a grid view as under</p>

<pre><code>&lt;asp:GridView ID="dgTask" runat="server" Width="100%" 
            AutoGenerateColumns="False" onrowdatabound="dgTask_RowDataBound"&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField DataField="TaskID" HeaderText="TaskID" ItemStyle-Width="1%" /&gt;
                &lt;asp:BoundField DataField="TaskName" HeaderText="Task Name" ItemStyle-HorizontalAlign="left"
                    ItemStyle-Width="10%" /&gt;
                &lt;asp:BoundField DataField="PriorityName" HeaderText="Priority" ItemStyle-HorizontalAlign="center"
                    ItemStyle-Width="10%" /&gt;
                &lt;asp:BoundField DataField="StatusName" HeaderText="Status" ItemStyle-HorizontalAlign="center"
                    ItemStyle-Width="10%" /&gt;
                &lt;asp:TemplateField HeaderText="Edit Task" ItemStyle-Width="10%"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:LinkButton ID="lnkBtnEdit" runat="Server" Text="Edit" CommandArgument ='&lt;%# Eval("TaskID") %&gt;' /&gt; 
                        &lt;asp:TextBox ID="txtId" runat="server"&gt;&lt;/asp:TextBox&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
            &lt;/Columns&gt;
        &lt;/asp:GridView&gt;
</code></pre>

<p>Now, what I have to do is that on click event of the linkButton, i need to hide the text box controls for that row.</p>

<p>How to do so?</p>

<p>So far I have done as under</p>

<pre><code>protected void dgTask_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            LinkButton btnEdit = (LinkButton)e.Row.Cells[4].FindControl("lnkBtnEdit");
            btnEdit.Attributes.Add("onclick", "return Test();");
        }
    }
</code></pre>

<p>Thanks</p>
