473,503 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

new ImageButton - no click event called

Hi,

I am trying to create a list of record every with an ImageButton
attached.

The code is like this:

ImageButton img = new ImageButton();
img.ImageUrl = "imgs/ok.bmp";
img.Visible = true;
img.ID = r_id.ToString();
img.Click += new
System.Web.UI.ImageClickEventHandler(this.select_C lick);
Page.Form.Controls.Add(img);

The problem is that select_Click is never called at click event;
Other thing is that the code is triggered by another button click,
so is not in Page_Load() function.

Thank you!
Mar 1 '08 #1
0 926

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

Similar topics

0
1789
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 '...
5
6159
by: J McD | last post by:
Hi I have a DataGrid with an ImageButton column. When I click on an imagebutton I get a postback but it doesn't run the OnImgBtnClick method. I can actually comment out the line where I add this...
1
3330
by: Henke | last post by:
Hello, I have one ImageButton controls which I initialize in Page_Load and declare on class level. ImageButton save = new ImageButton(); save.ImageUrl = "save.gif" save.Click += new...
3
2789
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
7054
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
13
7410
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
0
1483
by: Oddball | last post by:
I have set up a page with uses two lots of image buttons, one for a collection and one for more images from that collection. I generate all the image buttons on page init (I know, but I...
1
1489
by: serge calderara | last post by:
Dear all, I gave a datagrid object wich has a template column define as follow : <asp:TemplateColumn HeaderText="Evt"> <ItemTemplate> <asp:ImageButton id="ImageButton2" ImageAlign=Middle...
0
887
by: mihai | last post by:
Hi, I am trying to create a list of record every with an ImageButton attached. The code is like this: ImageButton img = new ImageButton(); img.ImageUrl = "imgs/ok.bmp"; img.Visible = true;
0
7202
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
7330
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...
1
6991
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
7460
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
5578
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
4672
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...
0
3167
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
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.