P
parsifal
Hi everyone
In my Page_Load, I create a control, and do an AddHandler on it
(VB.NET). The button is created and displayed, and does cause a
postback, but the event handler isn't fired. What am I doing wrong?
Here's the code for adding the button:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Using btn As New Button
btn.Text = "clicky!"
btn.CommandName = "CheckIn"
btn.CommandArgument = "stuff!"
AddHandler btn.Command, AddressOf CheckInAppointment
btn.ID = "StuffButton"
Debug.Controls.Add(btn)
End Using
End Sub
Thanks for any help!!
Sean
In my Page_Load, I create a control, and do an AddHandler on it
(VB.NET). The button is created and displayed, and does cause a
postback, but the event handler isn't fired. What am I doing wrong?
Here's the code for adding the button:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Using btn As New Button
btn.Text = "clicky!"
btn.CommandName = "CheckIn"
btn.CommandArgument = "stuff!"
AddHandler btn.Command, AddressOf CheckInAppointment
btn.ID = "StuffButton"
Debug.Controls.Add(btn)
End Using
End Sub
Thanks for any help!!
Sean