473,779 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ImageButton does not trigger Repeater.ItemCo mmand event

I have an ImageButton inside a Repeater control. However, the ImageButton
does not trigger the Repeater's ItemCommand event. For the moment, I am
nesting an Image control inside a LinkButton, which works, but requires more
work and 2 controls. I believe the reason for this is that the ImageButton
renders an <input type="image"/while the LinkButton renders an <a></a>
tag. Any ideas?
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Nov 15 '07 #1
2 4673
On Nov 15, 12:47 pm, "Nathan Sokalski" <njsokal...@hot mail.comwrote:
I have an ImageButton inside a Repeater control. However, the ImageButton
does not trigger the Repeater's ItemCommand event. For the moment, I am
nesting an Image control inside a LinkButton, which works, but requires more
work and 2 controls. I believe the reason for this is that the ImageButton
renders an <input type="image"/while the LinkButton renders an <a></a>
tag. Any ideas?
--
Nathan Sokalski
njsokal...@hotm ail.comhttp://www.nathansokal ski.com/
Is the ItemCommand event defined in your Repeater. I have tried to
simulate your problem but it works everytime i run it.

--
Keith Rull
http://www.keithrull.com/
http://www.devpinoy.org/
Nov 15 '07 #2
What is being rendered by Repeater? I believe that depending on what some of
the other controls on the webform are it does work in some scenarios, but
not others. If this is the case, I am not sure what causes it to render one
way or the other.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"keithrull" <ke********@gma il.comwrote in message
news:f5******** *************** ***********@e10 g2000prf.google groups.com...
On Nov 15, 12:47 pm, "Nathan Sokalski" <njsokal...@hot mail.comwrote:
>I have an ImageButton inside a Repeater control. However, the ImageButton
does not trigger the Repeater's ItemCommand event. For the moment, I am
nesting an Image control inside a LinkButton, which works, but requires
more
work and 2 controls. I believe the reason for this is that the
ImageButton
renders an <input type="image"/while the LinkButton renders an <a></a>
tag. Any ideas?
--
Nathan Sokalski
njsokal...@hot mail.comhttp://www.nathansokal ski.com/

Is the ItemCommand event defined in your Repeater. I have tried to
simulate your problem but it works everytime i run it.

--
Keith Rull
http://www.keithrull.com/
http://www.devpinoy.org/

Nov 17 '07 #3

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

Similar topics

1
9806
by: Mark Fox | last post by:
Hello, I have a repeater and in each itemtemplate I have a radiobuttonlist. I am attempting to figure out how on postback I could iterate through the rows displayed by the repeater and for each row grab the selected value of the radio button list. When is the Repeater.Items collection populated? I first attempted to access the Repeater.Items collection from the Command event of a normal linkbutton on the page, but it was empty. Is...
2
3203
by: Jorge Ayala | last post by:
Well I'm trying to catch and act upon a button event that is placed within the item template of a repeater control. Yet the code I'm using isn't working. What I've seen out there to explain how to do this is way complicated and assumes a familiarity with dot net that I don't have yet. I'll get it eventually but this is where I'll get it. Here's my code. First part is the user control and second is the code behind page Use control
0
3965
by: Patrik Persson | last post by:
Hello all I have got a problem with a nested repeater and the ItemCommand Event. I am adding handler for the ItemCommand and ItemBound. The ItemBound works perfect but I cant seem to get the linkbuttons to work with ItemCommand in the inner repeater. Can someone please help me? The following code (almost) is my problem! ASP CODE
3
4059
by: Piotr Strycharz | last post by:
Hi, I have a Repeater with CheckBox in one of its columns. In ItemDataBound handler I'm doing: chk.CheckedChanged += new EventHandler(chk_CheckedChanged). The chk_CheckedChanged handler is supposed to fire when I click the checkbox. Hoewever - it does not! It does not depend on EnableSessionState, it does not depend on AutoPostBack. simply - does not fire at all. Now - how am I going to know if user selects one of the rows in the...
9
7515
by: Joe | last post by:
I have a DataGrid with a templated column that displays ImageButtons. I need to know if one of these buttons caused the postback or just another button on the form. If one of these buttons caused the postback than I don't want to do a DataBind otherwise I do. I know __EVENTTARGET doesn't return this information. Is there anything else that does? Thanks, Joe
3
10930
by: Joel Daniels | last post by:
Hello, I am trying to determine the proper way to access the underlying data row for a Repeater item in the ItemCommand event. In the page load event, I bind the Repeater data source to a SqlDataReader. I check for !IsPostBack so the data binding only happens the first time. In the ItemCommand event, e.Item.DataItem is unassigned. Any suggestions? Thanks!
0
1796
by: Amir | last post by:
Hi every one This is the problem: I have a UserControl that contains a Repeater and a few LinkButton. The Repeater generate some linkButton. I use this control for implementing paging solution for another repeater in page. (So I have a repeater and a Usercontrol that contains repeater)
3
5179
by: Jimmy | last post by:
Hi, I built a webform with a repeater: <asp:repeater id="rep1" runat="server" DataSource='<%# ar %>'> <ItemTemplate> <asp:Button Runat=server Text="<%# Container.DataItem %>" ID="Button1" NAME="Button1"/> </ItemTemplate> </asp:repeater>
0
1244
by: Adam Right | last post by:
Hi All, i am using CommandArgument of imagebutton in a Repeater for adding a item to shopping basket, like that; ************************** <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand"> <ItemTemplate> <asp:ImageButton ID="addToBasket" runat ="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"STOCK_CODE")%>'
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9930
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.