To add images based on count in asp.net

hi,

suppose I have 5 check boxes. Based on number of check box checked I have to add image and hyper-link to images. (i.e if I have checked 2 check box I have to load only 2 image and link to those 2 loaded images, in-case of 3 check box checked, 3 images needs to be loaded and link to those 3 loaded images).

Is there any possible way that i can do that in asp.net using c#?

thanks

Do you want to show the controls on the page? eg. Input and button controls? Or do you just want to show the images and links?

So I am not 100% sure what you are after, but you could reference the checkbox items in C# code behind and create/ link the images if the checkbox has been checked.

So the pseudo code would be something like:

  1. Loop through the checkboxlist
  2. Count the number of list items checked
  3. create/link images according to the count of checkbox checked.