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

programatic table get images in folder

I have programatic table and I need to know to the correct syntax to get files and pass them in my reader.

My.Computer.FileSystem.GetFiles("\\A3\images\\New_11-27-11") << does not work.

 While sqlDR.Read
                r = New TableRow ' << place here start new row
                c = New TableCell ' << place here start new table cell

                ' c.ID = cnt + 1
                c.Text = "<img src=""\\A3\images\\New_11-27-11.jpg""/>"
                r.Cells.Add(c)

table1.Rows.Add(r)
0
Seven price
Asked:
Seven price
  • 2
1 Solution
 
Rahul_GadeCommented:
Using c.controls.add you can add image control programatically within the cell and then assign the image url to it. I guess this is the best way when you are performing everything programatically on server side.

-Rahul
0
 
Seven priceFull StackAuthor Commented:
what about in this format

 img.ImageUrl = "~/image_upc"
                img.Attributes.Add("onclick", "")

 img.ImageUrl = "imag.jpg"
                c.Controls.Add(img)
                r.Cells.Add(c)
0
 
Seven priceFull StackAuthor Commented:
tks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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