image button programatic in a table

Posted on 2011-10-31
Last Modified: 2012-05-12
I have a programatic table in vb, I want to have and image button that reads a folder.
What will happen is when the same is found in the database and matches the same name in the folder the image will show up.

I just need the correct synatx.
How can I match the images in my folder with the image name in the database to show up in my table.

  Dim mypath = Server.MapPath("image/imagefolder")
            Do While sqlDR.Read
                r = New TableRow ' << place here start new row
                c = New TableCell ' << place here start new table cell
                cnt = cnt + 1

                img = New ImageButton
                img.Width = "80"
                img.Attributes.Add("onclick", "")
                img.ID = "myNewimage" + cnt.ToString()
Question by:sevensnake77
    LVL 43

    Accepted Solution

    img.ImageUrl = "path to image goes here"
    LVL 9

    Author Closing Comment

    adulll to me. Just could not think straight, thanks.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now