Capturing a click event for a banner ad

Hello all,

I am trying to capture a click event for a banner advert on one of my sites.

In order to capture the click event in the code behind, I have tried to use:

an asp:hyperlink (until I found there is no click event!)

an asp:linkbutton with the the text set to html, as so:


<asp:LinkButton ID="lbtnBannerAd" Runat="server">

<A id="hrefadvert" href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.findasupplier.info/advertising/" target="_blank" name="hrefadvert">
<IMG id="imgAd" src=http://www.webdeveloper.com/forum/archive/index.php/"http://www.findasupplier.info/marketing/i/bannerads/fasm_advertis_banner.gif" border="0" name="imgAd"></A>

</asp:LinkButton>

I am using a JavaScript to control the 'img src' (imgAd) and 'href' (hrefadvert) of the banner ad click-thru. The JavaScript also rotates the banners.

The above linkbutton renders fine as an image and the click-thru and banner rotation works properly, I just cannot capture the click event.

The reason I want to capture the click event is to record how many times each banner has been clicked on. In the click event, I will be running a simple stored proc to insert the banner ad ID and date/time into a statistics table.

Does anyone have any idea how this can be done?

Many thanks.

AJN
 
Top