Calling Shadowbox from Code Behind

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Calling Shadowbox from Code Behind


I'm using VB.NET and I have a page with one single image and a gallery of six images. I was using Shadowbox in the html markup without problems, but my customer now wants to log the date and time users click on the images (the images in the gallery can just be counted as one). I have a function that does the logging in the code behind, but I'm not sure how to call it. I tried using ServerClick on the anchor but then the Shadowbox doesn't load. I've also tried using only the ServerClick and calling Shadowbox via ClientScript.RegisterStartupScript, but I get a is null error in Shadowbox.js. I get the same error when I just put the Shadowbox.Open call in the onclick of the anchor:

< a runat="server" id="lkImage1" href="" onclick="{
              content: '------.jpg',
                player: 'img',
                title: 'Welcome'
            });" >
< img src="" runat="server" id="Image1" alt="" height="275" />

Any help would be appreciated!

Thank you.