Adding Table Cells and Images/Links (ASP.NET Controls) Dynamically

Discussion in 'ASP .Net' started by Carl Gilbert, Jul 20, 2005.

  1. Carl Gilbert

    Carl Gilbert Guest

    Hi

    I am working on a site using ASP.NET, VB.NET and SQL Server. I have a page
    that displays images, and I want to display additional links to other images
    within the same category.

    When the page loads I know how many pages are in the current category and
    the current page (set of images to display). The images are displayed in
    groups of 8 but a category may have more than 8 images. To provide a way to
    view other images in the category, I would like to place links at the bottom
    of the page.

    I will know how many pages I have in the category by dividing by 8 and
    rounding up.

    The following link shows a screenshot of how the page might look with a
    category of 48 images. It shows that we are on page 1 and there are 5 other
    pages available.
    http://uberand.com/images.jpg

    I would therefore like to ask if anyone knows how to dynamically add these
    links in the page load event.

    The dividers are 1px wide so I was thinking of just using a load of <TD>'s
    setting the dividers to 1px wide with a background color and then using
    <ASP:HYPERLINK>'s for the numbers so I can dynamically set their target
    URL's unless anyone has any better ideas.

    So really I think it could just a case of inserting HTML from the code
    behind file. If so, how can this be done?

    Regards, Carl Gilbert
     
    Carl Gilbert, Jul 20, 2005
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.