I have a table with eight placeholders: plc1 - plc8.
The behind code:
Expand|Select|Wrap|Line Numbers
- Dim p As Integer = New Integer
- Dim plc As PlaceHolder = New PlaceHolder
- Dim ipic As Image = New Image
- ipic.ImageUrl = "Test\face_brian.jpg"
- Dim plcPic(8) As String
- plcPic(0) = "plc1"
- plcPic(1) = "plc2"
- plcPic(2) = "plc3"
- plcPic(3) = "plc4"
- plcPic(4) = "plc5"
- plcPic(5) = "plc6"
- plcPic(6) = "plc7"
- plcPic(7) = "plc8"
- p = (CInt(plcPic.Length - 1) * Rnd() + 1)
- 'Dim adrs As String = Convert.ToString(p)
- plc.ID = plcPic(p)
- plc.Controls.Add(ipic)
The code runs and the debugger shows the values being populated, but the Image doesn't display! No errors post.
Why Not? Any help? It's a mystery.