Welcome Guest Search | Active Topics | Sign In | Register

Toolbar problem: an ItemClick event unexpected occurs Options
Don
Posted: Wednesday, December 3, 2008 6:25:45 AM
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
eo_support
Posted: Wednesday, December 3, 2008 6:38:45 AM
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
Don
Posted: Wednesday, December 3, 2008 4:27:32 PM
Rank: Newbie
Groups: Member

Joined: 12/3/2008
Posts: 2
It works! Thanks a lot :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.