By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,642 Members | 1,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,642 IT Pros & Developers. It's quick & easy.

Event Bubbling From The HeaderTemplate

P: n/a
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.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Nathan Sokalski wrote:
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.


Can't you set the ItemCommand for the LinkButtons? This will still
raise the DataList's ItemCommand event, and you can do:

If e.CommandName = "..." Then
...
ElseIf e.CommandName = "..." Then
...
ElseIf e.CommandName = "..." Then
...
End If
Where "..." is the ItemCommand values for the various LinkButtons.

--

Scott Mitchell [ASP.NET MVP]
mi******@4GuysFromRolla.com
http://www.4GuysFromRolla.com/ScottMitchell
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.