views:

838

answers:

0

Hey all, I'm creating a loop in C# to define that each hotspot in an imagemap, opens a ThickBox inline content windows.This is the code for the ThickBox inline content link:

<a href="#TB_inline?height=155&width=300&inlineId=hiddenModalContent&modal=true" class="thickbox">Show hidden modal content.</a>

Here's my code behind the imagemap. How can I combine ThickBox with the hotspots, so that a click on them open a thickbox window?

 protected void ImageMap2_Click(object sender, ImageMapEventArgs e)
{
    //this is a loop because I have 22 hotspots
    for (int a = 0; a < 23; a++)
    {

 if (e.PostBackValue.Contains("HS" + a))
        {
          //This line is just for testing which hotspot
          Label2.Text = "You selected " + " " + e.PostBackValue;

      Response.Redirect("http://www.someplace.com"); 

    } 

}