473,396 Members | 1,706 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,396 software developers and data experts.

ImageButton in datalist doesn't capture event

hn
I have an imagebutton as a datalist item. When I click on the image button,
the event is not fired. It works fine with Linkbutton. Please help.

The code snippet is as followed:

<asp:datalist id="dlTest" runat="server" Width="100%" DataKeyField="test_id"
CellSpacing="2" CellPadding="2">
<ItemTemplate>
<TR><TD style="FONT-SIZE: 10pt" bgcolor="#eeeeee">
<asp:ImageButton id="ibtnImage" Runat="server" CommandName="Show"
ImageUrl="~/images/page.gif"></asp:ImageButton>

<asp:LinkButton ID=tmp Runat=server text="sdfdsf"
CommandName="fire"></asp:LinkButton>
</TD>
</TR>
</ItemTemplate>
</asp:datalist>

---Code behind:---
Private Sub dlTest_ItemCommand(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataListCommandEventArgs ) Handles dlTest.ItemCommand
Response.Write("e.CommandName=" & e.CommandName)
end sub
Nov 18 '05 #1
0 3178

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark | last post by:
Hi, I am trying to capture the click event of an ImageButton that exists in a composite server control that I am building. I create the imagebutton in the CreateChildControls routine '...
1
by: wsyeager36 | last post by:
I have a datagrid inside a datalist. The datalist shows parent info and the datagrid shows the child info for that parent. There is a checkbox on each row of the child datagrid. Also inside the...
3
by: Benjamin Gavin | last post by:
Hi all, I recently stumbled upon a bug in the ASP.NET framework handling of ImageButton based postbacks. The issues derives from the fact that IE and Mozilla handle the case of a missing image...
3
by: TCORDON | last post by:
Why does the click event of an image button that submitts a form does not get fired when ENTER is pressend on a textbox of that form? How can I make this happen? Thanks
1
by: Gary | last post by:
I'm having a problem with the DataList control, my situation is as follows... I have a DataList with a Drop Down List Box (DDLB) in the header, this DDLB is set to AutoPostBack = True. When the...
3
by: JuniorProgrammer | last post by:
Am trying to add an Image Button into a Datalist at Design time. When I run it it comes up with error: Server tag not well formed. It works perfectly when I add just an Image Control. Please...
0
by: artich | last post by:
Hi, I'm developing an application for an internet TV browser (Opera for TV) and like MSN TV, the browser interprets an ImageButton that displays a large image as an Image Map because the...
4
by: suzanne.boyle | last post by:
Hi, I'm adding an ImageButton as a child to a custom web control and attaching an event handler to it. When the page posts back the event is not being fired however. I initially assumed I had...
1
by: cradius | last post by:
I've got a custom user control, with a DataList, that is dynamically added to the page. In the DataList is an ImageButton that, when clicked, fires off the ItemCommand event of the DataList and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.