how to grab the Ctl from a linkbutton
<p>I have a gridview which is pulling it data from a stored procedure. In the column title, I have used a Linkbutton. I would like to grab the Ctl ID and store it in a variable when it is clicked. I am not sure what is happening, but I get a few strings going through. Below is my code and this is similar to my previous post.</p>

<p>ASP.NET</p>

<pre><code>&lt;asp:TemplateField HeaderText="ID"&gt;
            &lt;ItemTemplate&gt;
            &lt;asp:LinkButton ID="lnkID" runat="server" OnClick="lblClick1"
            Text='&lt;%#Eval("ID") %&gt;'&gt;
            &lt;/asp:LinkButton&gt;
            &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
</code></pre>

<p>C#:</p>

<pre><code> GridViewRow row = gv2.SelectedRow;
    string controlId = ((LinkButton)row.FindControl("lnkID")).ID;
    lblshow.Text = controlId;
</code></pre>

<p>Can someone help me get up and running. Thanks.</p>
