I'm trying to create a button in a server table cell at runtime and
wire it up to an event procedure. I tried this:
Dim x As New Button
x.Text = "Edit"
x.CommandArgument = parts(1)
AddHandler x.Click, AddressOf EditHearing
EditHearing has two arguments, sender and arguments, but if I use
System.EventArgs, nothing happens, and addhandler won't let me wire it
up to an event that has CommandEventArgs.
I guess I can use a linkbutton but I wanted to do some processing
before moving off to the next page.
Ideas appreciated.
|