• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

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()
                c.Controls.Add(img)
                r.Cells.Add(c)
0
Seven price
Asked:
Seven price
1 Solution
 
AndyAinscowCommented:
img.ImageUrl = "path to image goes here"
0
 
Seven priceFull StackAuthor Commented:
adulll to me. Just could not think straight, thanks.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now