<div>
<asp:Panel ID="p1" runat="server">
</asp:Panel>
</div>
</form>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
protected void Page_Load(object sender, EventArgs e)
{
Button MyButton = new Button();
MyButton.ID="btn";
MyButton.Text = "hhhhh";
MyButton.Click += new EventHandler(MyButton_Click);
p1.Controls.Add(MyButton);
}
protected void MyButton_Click(object sender, EventArgs e)
{
Label1.Text = "Hi";
}
Thanks and Regards
Akiii