One of the functionalities in my ASP.NET page involves retrieving a series of images from a database table using an enumerator to cycle through and display them.
In the codebehind (VB.NET), I dynamically add a placeholder along with some controls inside tables nested within it.
I recently programmatically added a button within this placeholder (within a table cell), but now I am trying to figure out how to add a click event to the button programmatically. My goal is to trigger a JavaScript function (a lightbox) that will display a larger preview of the image when the button is clicked. Currently, the lightbox works when a user clicks on a small image which calls a specific hyperlink in the code pointing to the JavaScript.