Dynamically add Button to Panel
<p>I am adding a RadButton dynamically to a Panel. So I am creating the button as so:</p>

<pre><code>        RadButton btnAwesome = new RadButton();
        btnAwesome.AutoPostBack = true;
        btnAwesome.Text = "Click me...";
        btnAwesome.ID = "LinkButtonTest";
        btnAwesome.Click += new System.EventHandler(lnkbtnEditRecord_Click);
</code></pre>

<p>and it it should call this method onclick:</p>

<pre><code>    protected void lnkbtnEditRecord_Click(object sender, EventArgs e)
    {
        salesEditPanel.Visible = true;
        resultPanel.Visible = false;
        zipPanel.Visible = false;
        ddlPanel.Visible = false;
        topPanel.Visible = false;
    }
</code></pre>

<p>It adds the button the Panel but it doesn't add the onclick to it. Any idea what I am missing?</p>

<p>Thanks!</p>
