Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Me.IsPostBack Then
call btnOne_Click
end if
End Sub

Private Sub btnOne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOne.Click
Dim chkSample As New CheckBox
With chkSample
.Text = "I was added in the code"
.ID = "chkSample"
.EnableViewState = True
End With

pnlSample.Controls.Clear()
pnlSample.Controls.Add(chkSample)
pnlSample.EnableViewState = True

lblTalk.Text = "button ONE was clicked"
End Sub

Private Sub btnTwo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTwo.Click
lblTalk.Text = "button TWO was clicked"
End Sub