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

Dynamicly generated controls not firing their events

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 next postback...

As an exemple, I first load the page, I click on an image which add a line
to the table (with the requiered image buttons). Because the table is all
redrawn, all the table is rebuilt on each postback (no matter if it was
modified or not) so everything should work fine, but now the new line is
added but the imagebuttons does not fire their events anymore (all of them,
not only those from the added line) until I click one of them and cause a
postback... after a (second) postback (one more thant the one needed to
generate the new line), everything is back to normal...

Does anyone have any clue on what it could be? would you need some code
sample?

thanks

ThunderMusic
Aug 22 '06 #1
1 1130
Problem solved... setting an ID for each ImageButton solved the problem
(dah!!)... ;)
"ThunderMusic" <No*************************@NoSpAm.comwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
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 next postback...

As an exemple, I first load the page, I click on an image which add a line
to the table (with the requiered image buttons). Because the table is all
redrawn, all the table is rebuilt on each postback (no matter if it was
modified or not) so everything should work fine, but now the new line is
added but the imagebuttons does not fire their events anymore (all of
them, not only those from the added line) until I click one of them and
cause a postback... after a (second) postback (one more thant the one
needed to generate the new line), everything is back to normal...

Does anyone have any clue on what it could be? would you need some code
sample?

thanks

ThunderMusic

Aug 22 '06 #2

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

Similar topics

4
by: JezB | last post by:
I am dynamically creating WebControls and creating them on my page. Some of these are buttons, and I attach events to these buttons. The problem is these force a post-back, so I must regenerate all...
7
by: Scott Emick | last post by:
How can I disable events for the controls on a form? I tried setting the form's enable property to false, but that doesn't stop events from firing on its controls. I need to temporarily disable...
2
by: Wayne Sepega | last post by:
I have the following Code: foreach (MyClass d in myClassCollection) { curRadioBtn = new RadioButton(); curRadioBtn.Text = d.ToString(); curRadioBtn.GroupName = "Contact"; curRadioBtn.ID =...
4
by: GS | last post by:
Hi, I dynamicly add custom control in SelectedIndexChanged even of GridView which is firing after Page_Load. My control is not being rendered to page becouse of that (I assume). How to avoid this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...

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.