Can't add programmatic controls in ASP.NET
<p>I've got a page in ASP.NET, and I'm dynamically adding a subclass of WebControls.Button to the <code>Controls</code> data member of a pre-existing static TableCell. The button displays fine in the browser as expected. But when I click the button, the event handler I added for <code>button.Click</code> is not being called. Any suggestions as to why this is?</p>

<pre><code>var controls = this.displaytable.Rows[i].Cells[j].Controls;
var button = new TableButton(j, i);
button.Click += new EventHandler(this.button_Click);
button.UseSubmitBehavior = false;
button.Text = "Available";
controls.Add(button);
</code></pre>
