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?
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?