Rank: Newbie Groups: Member
Joined: 12/3/2008 Posts: 2
|
After I clicked an item in the toolbar, the server side ItemClick event should only be triggered once, but it repeated immediately after the first time. This happens even when I've commented all codes inside the sub procedure.
the scenerio is like what follows (1)I "click" an item in the toolbar (2)-> Protected Sub ToolBar1_ItemClick(...) <--------1st time -> End Sub (3)-> Protected Sub ToolBar1_ItemClick(...) <--------2nd time, should not happen -> End Sub (4)exit ToolBar1_ItemClick(...)
Something weird is, after I add the other new and clean toolbar to my page as a test, though the new one works normally, the original ToolBar1's click event begins to happen 3 times by only 1 click.
Does anyone experienced the same problem? appreciate any idea
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
This is almost always caused by you hooking up the event handler more than once. A very typical scenario for this is:
1. It was hooked once in your .VB file:
Sub ToolBar1_ItemClick(...) Handles ToolBar1.ItemClick
2. It was hooked a second time in your .ASPX file:
<eo:ToolBar OnItemClick="ToolBar1_ItemClick" ....> ....
Remove any one of them should solve the problem for you.
Thanks
|
Rank: Newbie Groups: Member
Joined: 12/3/2008 Posts: 2
|
It works! Thanks a lot :)
|