The click event of LinkButton doesn't call when i add Button to GridView's Cell from code behind
<p>I use below code for add Button to GridView's Cell from code behind <code>when user click on a button</code>,but when i click on each button that i add,the click event(lnk_Click) doesn't call and button hides after i click on it.how can i solve this problem?</p>

<pre><code>//aspx
    &lt;asp:GridView ID="GridView1" runat="server" GridLines="None" Width="940px"
      OnSelectedIndexChanged="grid_SelectedIndexChanged"
      onrowdatabound="GridView1_RowDataBound" AutoGenerateColumns="False" CssClass="gridview"&gt;
       &lt;Columns&gt;
          &lt;asp:TemplateField HeaderText="..."&gt;
               &lt;ItemTemplate&gt;
                   &lt;asp:Panel ID="pnlSteps" runat="server"&gt;&lt;/asp:Panel&gt;
               &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
       &lt;/Columns&gt;
  &lt;/asp:GridView&gt;

    //Code behind
    for (int i = 0; i &lt; GridView1.Rows.Count; i++)
            {
                Panel pnl = (Panel)GridView1.Rows[i].Cells[0].FindControl("pnlSteps");
                LinkButton lnk = new LinkButton();
                lnk.Text = "...";
                pnl.Controls.Add(lnk);
                lnk.Click += new EventHandler(lnk_Click);
            }//for
    ...

    protected void lnk_Click(object sender, EventArgs e)
        {
    //...
    }
</code></pre>

<p>I fill the gridview with below code</p>

<pre><code>//dsSet is DataSet that i fill it with data from Database
DataTable dtt = new DataTable();

        dtt.Columns.Add(new DataColumn("status", typeof(string)));
        dtt.Columns.Add(new DataColumn("finantial", typeof(string)));
        dtt.Columns.Add(new DataColumn("phone", typeof(string)));
        dtt.Columns.Add(new DataColumn("name", typeof(string)));
        dtt.Columns.Add(new DataColumn("code", typeof(string)));

        for (int i = 0; i &lt; dsSet.Tables[0].Rows.Count; i++)
        {
            DataRow dr = dtt.NewRow();

            dr[0]=...;
            dr[1]=...;
            dr[2]=...;
            dr[3]=...;
            dr[4]=...;

            dtt.Rows.Add(dr);
        }//for
        GridView1.DataSource = dtt;
        GridView1.DataBind();
</code></pre>

<p>//Command
i also use <code>CommandName</code> like below and set <code>GridView_RowCommand</code> to Gridview's <code>OnRowCommand</code> but doesn't work</p>

<p>lnk.CommandName = "Select";</p>

<p>protected void GridView_RowCommand(Object sender, GridViewCommandEventArgs e)
{
.....</p>
