Add image to DataList Template Item

I have a datalist that is populated using an ArrayList. When this is rendered i want to set the background image depending on a list item value, at the moment i have set the image in CSS but i dont know how i would change the image depending on the value.

I have an image folder that contains an image for every team so for example, if the first datalist team node = "Liverpool" then the datalist item background should be set to Liverpool.gif and then the same for each team.

Yes i can see the differences int he code you have given where you have directly applied the cssclass to the itemstyle tag. The issue i have now is that i am using this as a drag and drop area which is quite like a shopping basket. I am using jquery to implement the drag and drop and there is some javascript included to make it function. I have defined a div block inside my datalist item template and then declared some user defined attributes so that the javascript can use them to reference, such as the item attribute which increments a number to pass to the javascript.