Sorry to burst your Event Bubble, but that is incorrect. First of all, the
ItemCommand uses "source", not "sender". Second, the value of "source" will
always be the DataList that the event was bubbled from, not the control that
triggered the event. One thing that I noticed, I haven't had time to look
into it yet, but while I was testing some other code of mine that uses event
bubbling, I noticed that in the Trace information there is a value (I don't
know if it's a variable or not) called __EVENTTARGET which has the value of
the control which triggered the event bubbling. If Trace can get at this
value, I was wondering if there might be a way to get at it through some
kind of system variable? If anyone knows anything about this, I would like
to know. Thanks.
--
Nathan Sokalski
nj********@hotmail.com http://www.nathansokalski.com/
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
It's the 'sender' parameter in the event handler.
-Brock
DevelopMentor
http://staff.develop.com/ballen
I have three LinkButtons in the HeaderTemplate of my DataList (I use
them to let the user determine what to sort the list by). I am
assuming that the event will be bubbled to the ItemCommand event
(since that is the default and I did not supply a CommandName).
However, I need to determine which of the three LinkButtons triggered
the event. How can I do this? Thanks.