You should take care of you dynamic controls during the PreInit event of the Page, as it says here.
You mentioned you're not doing it in the Page_Load, I assume you're doing it at a later point. If you follow the guideline above, your button's click event handler will run.