Hi Andrew,
There are no problems with the events. They fire as they should. I recreate
them in postbacks and all that.
My question is concerning the fact that TextChanged fires (the event order
is random right?) before a button event I have from a LinkButton. Now, I
need to know if the LinkButton (in this case it's a cancel) has been pressed
so that I can handle my data in the TextChanged event.
I could not use the TextChanged event and instead load the ViewState and
compare old with new to set the new in case there wasnt a Cancel. But the
problem is that would take even more time to implement.
Another solution would be to learn how to be a gardener and change jobs. or
wait for Mono and change it so it works MY way.
Thanks,
/ jorge
"Andrew Wied" <an*******@disc ussions.microso ft.com> wrote in message
news:F3******** *************** ***********@mic rosoft.com...
I'm not entirely sure of what you're asking, but I have encountered two
things which prevent an event handler from dealing with dynamically added
control events.
1) You need to add the handler. For instance:
Suppose I have a table cell 'td' which I want to add a linkbutton to
programatically ...
Dim lb as new LinkButton
' add all the stuff to the linkbutton...
'Add the handler
AddHandler lb.OnClick, AddressOf me.lbEventHandl er
'And the lbEventHandler would be your event handler.
2) Also, look to make sure that you have the controls created again for
the postback. If they aren't around after you click on them, the systme
won't know what to do.
Hope that helps,
Andrew Wied