SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,877
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    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?

  3. #3
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •