473,402 Members | 2,055 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,402 software developers and data experts.

How to create dynamic events handlers for Imagebuttons

RA
Hi

I have a dynamic asp.net table created from the database. I am adding an
ImageButton to each row so the client can click on it. Each ImageButton has
the ID = orderid from database. How can I receive the click event when the
user clicks one of the buttons. Eventually I would like to do the same
processing for all buttons depending on their ID.
Thanks,
Ronen
Nov 18 '05 #1
2 1892
Hi Ronen,
If you create the buttons dynamically in the
Page_Initialize event then your page will be able to
receive click events from them. Creating them in the
Page_Load event (as most people try to do by default)
results in the events not being wired up.

alex
-----Original Message-----
Hi

I have a dynamic asp.net table created from the database. I am adding anImageButton to each row so the client can click on it. Each ImageButton hasthe ID = orderid from database. How can I receive the click event when theuser clicks one of the buttons. Eventually I would like to do the sameprocessing for all buttons depending on their ID.
Thanks,
Ronen
.

Nov 18 '05 #2
RA
How can I tie them all to the same event handler?

"alex bowers" <al*********@dunnhumbyNSPM.com> wrote in message
news:09****************************@phx.gbl...
Hi Ronen,
If you create the buttons dynamically in the
Page_Initialize event then your page will be able to
receive click events from them. Creating them in the
Page_Load event (as most people try to do by default)
results in the events not being wired up.

alex
-----Original Message-----
Hi

I have a dynamic asp.net table created from the

database. I am adding an
ImageButton to each row so the client can click on it.

Each ImageButton has
the ID = orderid from database. How can I receive the

click event when the
user clicks one of the buttons. Eventually I would like

to do the same
processing for all buttons depending on their ID.
Thanks,
Ronen
.

Nov 18 '05 #3

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

Similar topics

6
by: Mark | last post by:
I have been working for quite some time on this issue which in theory should be quite simple. The problem is that the Cancel and Save events are not fired when their respective buttons are...
0
by: Kenton Smeltzer | last post by:
Hello All, I am having a problem with events and the addition of controls on a page I am developing. First let me tell you what I have tried and then maybe someone can see something I missed. ...
3
by: leon | last post by:
hello friends, i am writing a page aspx and creating controls dinamicaly and then i must to create for each control the events as well. Anybody to know how????? happy day lion
2
by: Mark Broadbent | last post by:
I had a requirement to code dynamic delegates, so they attach detach from the button as needed ... then after time realised that the button is not retaining it's click handlers. To circumvent this...
2
by: Bruce | last post by:
I have a button on a form that creates multiple ImageButtons; I want each ImageButton's click event to then redirect to another URL. From doing some research, I understand this has to do with...
2
by: mike | last post by:
i'm building an desktop windows app in C#. the main menu for the application will be different depending on the admin rights of the user. i've built the entire app. in delphi and i simply activated...
1
by: ThunderMusic | last post by:
Hi, In a page, I dynamicly generate a table in which there are ImageButtons... When the table is first loaded, it's fine, but as soon as the table is modified, the events are not fired until the...
7
by: =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ== | last post by:
I am having trouble getting client-side events to fire on ImageButtons. Instead I am seeing postbacks. The client-side handlers end with "return false;" but they are never called. ...
0
by: galien8 | last post by:
Dear Newsgroup Readers, I have a problem with dynamic controls, in a DotNetNuke module, and event handlers in VB.NET ASP.NET 2.0. Events are firing and being handled, sometimes good but also...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.