On my site, I display an image after the user clicks on a thumbnail (opens in a lightbox). I want to store the number of times users open the images.
I was thinking of something like pointing to an ASHX page that generates the image and updates the DB with the view count, but this can't be done since this is a remote file from a CDN. I can't just count the thumbnail clicks, since the image opens in lightbox.
Can anybody suggest a way I can accomplish what I'm trying?
Thanks, WT
Because you're using javascript to open the image in the lightbox just add some code to make an ajax call at that point to your ashx handler. The handler should just record that the image has been viewed.