I am using visual studio 2008 coding asp.net.vb
I have 20 images on my site, the image holders being named picbox1 picbox2 picbox3 … picbox20.
I want to be able to address each picbox programmatically; pseudo code would look something like this
if myvar = 1 then
picbox(myvar).imageurl="XXXXXXX"
end if
Can this be done and if so how?
Ah sorry should have said, I need to do this server side as part of my vb code.
Thank you for all and any help.
You can loop through the control in your form like so:
Or you could just do a FindControl like so:
Dim img1 As Image = CType(form1.FindControl(“picbox” & myvar.ToString()), Image)
img1.ImageUrl = “XXXX”