Under what circumstances are you adding the button to the page? Are you adding it the same way during the page postback?
Controls must be present in the control tree in order for any events on them to fire. You can not, for example, add a button and connect an event handler to it during an initial page load (wrapped in "if(!IsPostback)") and expect that handle to be called. On the postback the button is not in the page's control tree, and thus its handler is not connected. You must recreate the button the same way during the postback so it is present in the control tree in the same way, otherwise its event handler will never be called.
Can you explain generally what you are trying do? There may be a better way to do it that requires less dynamic control generation.
I often solve these problems by working backwards. I think about all the controls I'll possibly need on a page/user control and put them into the designer. Then I simply hide the ones I don't need based the process going on. I've found it much easier to removed controls that are already there than to try to add them dynamically. I haven't found there to be a performance problem with this model. In an extreme case, I had a page with a repeater that contained at least a dozen controls (both standard and custom) in its item template. Ultimately each row of the repeater only used one of those controls. But it proved much easier to put in everything I might need, then remove what I didn't.
-Peter
peterlanoie.blog