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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Meade
    Replies:
    4
    Views:
    7,388
    Rob Meade
    Nov 25, 2003
  2. Bob Rock
    Replies:
    1
    Views:
    689
    Cowboy \(Gregory A. Beamer\)
    Sep 17, 2006
  3. JMick
    Replies:
    0
    Views:
    814
    JMick
    Mar 11, 2010
  4. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    345
    Joel Finkel
    Sep 1, 2003
  5. Eschew Obsfucation
    Replies:
    3
    Views:
    168
    Thomas 'PointedEars' Lahn
    Nov 13, 2003
Loading...

Share This Page