Datalist itemdatabound event

ManicCW

Well-known member
Joined
Jul 21, 2005
Messages
428
Location
Mostar
Programming Experience
Beginner
[RESOLVED]Datalist itemdatabound event

Hi
I used ItemDataBound event to set text properties of labels and imageurl propertie of image control in Datalist. I use XMl as datasource.

VB.NET:
if e.item.itemtype = listitemtype.item then
Dim img as webcontrols.image = ctype(me.dl.findcontrol("imgPicture"), webcontrols.image)
img.imageurl = "Something"
end if

I get object reference not set to an instance of an object error.
I have done this similar with repeater control and it worked (I used access database). Is it problem in XML or...???
 
Last edited:
Back
Top