Originariamente inviato da djciko
codice:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim bottone As New Button
        bottone.ID = "btn"
        bottone.Text = "Cliccami"
        Me.form1.Controls.Add(bottone)
        AddHandler bottone.Click, AddressOf BottoneCliccato
    End Sub

    Protected Sub BottoneCliccato(ByVal sender As Object, ByVal e As System.EventArgs)
        Response.Write("hai cliccato il bottone")
    End Sub
non funziona!