ImageButton addhandler not firing !

T

Tee

Hi,

I have a server control Table with each row will contain a dynamic created
ImageButton.
And I have a private sub with the proper delegate of an ImageButton click
which handle nothing.
After each ImageButton is created, I addhandler the ImageButton to the
private sub, which gave me no error.

But on the runtime, whenever the imagebutton is clicked, it seems like none
of the code is being executed.
Anyone know why ?

if I create another asp.net project with just only imagebutton and sub for
testing purpose, it works.
But when in my real project, it is not working ... but also didn't gave any
error.

Please help me on it, Thanks alot.


Regards,
Tee
 
M

Martin Dechev

Hi, Tee,

First - you should attach the handler to the event on each pass. An
appropriate place to do this is the Page_Load method.

Then, you should debug your code. Add a breakpoint in the handler to see if
the code is entered.

Hope this helps
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top