473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Event Bubbling From The HeaderTemplate

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
1 908
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark Szlazak | last post by:
Apparently there is a textarea onscroll event bubbling bug in Firefox and Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=229089 I'm trying to check for this bug with the following...
4
by: Wee Bubba | last post by:
the following event handler checks to see if any parent control has attached to the event 'SearchItemSelect'. i use it for event bubbling whenever one of my search items has been selected and at...
7
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
3
by: Nathan Sokalski | last post by:
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...
7
by: comzy | last post by:
I have created an event bubbling for my pager control which is used for implementing paging in data grid. Althoug it worked very fine in .NET 1.1 it is throwing the following error after i migrated...
4
by: Nathan Sokalski | last post by:
I have a DataList that has an Button as one of the controls in it's ItemTemplate. The Button has a CommandName="delete" attribute, but when I click it the DeleteCommand event doesn't even get...
17
by: dan_williams | last post by:
I have the following test web page:- <html> <head><title>Test</title> <script language="Javascript"> <!-- function fnTR() { alert("TR"); }
1
by: David | last post by:
Hi all, I have a page that inherits from my own page class that inherits from system.web.ui.page. In my page, I have a button click event that saves content of the page. The saving is...
5
by: rawatgaurav81 | last post by:
I had a question on updatepanel. I had a simple form where I had one update panel.It contains a tab container which contains 3 tabs.Now I had set auto-postback of this container to true.I am not...
2
by: alhalayqa | last post by:
hi, in MSIE, you can attach onclick event to both anchor and document objects. here is some code : document.onclick = function() {alert('document clicked ...'); } <a href= " " ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.