Only every second fired event gets through to the handler

K

K Viltersten

I have a set up of three LinkButton objects. Let's
call them A, B and C. As the event manager, i'm
using the following setup.

private void DelItem(
Object sender,
CommandEventArgs eventArgs)
{
...
Page_Load(null, null);
}

When i click on button C, the page is reloaded
and after that, the handler is called. After the
deletion in the DB has been done, i reload the
contents of the page as show above.

Now, i only have buttons A and B, since their
number is based on the number of items in my DB.

Problem:
When i press button A, the page is reloaded but
the event handler is not called. However, if i
then click button B, the handler IS called.

Please note, that no matter which button i start
with, i always get the correct behavior for the
first click, the third, the fifth, etc.

First i thought that it was some kind of lag but
then, clicking B would actually remove the
previously clicked button A, which it doesn't.

Also, i've checked that for each regeneration of
the page, all the buttons get their +=DelItem.

What might be the cause? How to kill it?
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top