hi

i'm generating a button in runtime and when clic on it, does't fire the sub in vb

Dim botonete As New Ext.Net.Button
botonete.Text = "en tiempo de ejecucion"
botonete.ID = "id1"
botonete.X = 200
botonete.Y = 100
botonete.Visible = True
botonete.Type = Ext.Net.ButtonType.Button
botonete.Icon = Ext.Net.Icon.EjectGreen
botonete.AutoPostBack = True
botonete.ToolTip = "cambio de plan"
botonete.AddListener("clic", "doSomething")

i want execute this sub when the button is pressed

Private Sub doSomething()
-------do something------
End Function

but works ok when call an js function

botonete.Listeners.Click.Fn = "myCustomFn"

my question is: how can i invoke a vb sub/function in a codebehind generated button?

thanks