Author: Jerrz | Posted on: 6/13/2009 5:09:09 PM | Views : 468

Hi, I'm facing a bit of a challenge: 
I have a page containing a couple of links. When a user clicks a link, I would like to open a new browser window and count the click, which I do in code by updating the click counter in my database (UpdateClick(int LinkID)).
The problem is that when I use a linkbutton or imagebutton, set the postback or navigateURL, the click event is not being executed. If I do not set the linkbutton's postbackURL but instead execute UpdateClick method in the click event and then do a response.redirect, the browser will never open a new window.
Does someone have a good idea for me how to approach this issue? Preferably I would like to open a new browser first when a link is clicked, and then update the link counter in the background ("fire and forget"), so the user doesn't have to "wait" for this internet is slow.
Thanks, Jerrz
...

Go to the complete details ...