image button programatic in a table

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()
Seven priceFull StackAsked:
Who is Participating?
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
img.ImageUrl = "path to image goes here"
Seven priceFull StackAuthor Commented:
adulll to me. Just could not think straight, thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.