views:

17

answers:

0

I am beginning to use SimpleModal in my ASP.NET project. I am starting with the demo code provided on the SimpleModal site. I have a page that renders images using a ListView control. When I click on one of the images - I use SimpleModal's demo code to bring up a modal window showing details on the image I clicked. For now, I have hard coded this functionality, so the basic functionality of clicking on one of the images in my ListView control does in fact bring up the modal window displaying details. But now I need to make this dynamic. I am not sure how to do this. Any help is very much appreciated. Below is the jQuery function that brings up the Modal Window:

jQuery(function ($) {
$('#basic-modal .basic').click(function (e) {
$('#basic-modal-content').modal();
return false; }); });

Clicking on this button fires the jQuery function:

(input type="button" name="basic" value="Demo" class="basic"/)

I need to pass a value (i.e. ID) of the image being clicked. In the code-behind I have a method that retrieves image details based on image id. I am not sure how to wire all of this up. Essentially, clicking on an image, calling a Server Side method to retrieve data, and showing results in the modal window (which is a DIV). I am using a Repeater control in the modal window (this is the hard coded part right now). Any suggestions are very much appreciated.