ok, I’m trying to figure out how to put some data into an inline style.
I want to read from a data source and build the URL for a background image of a
<li style="background-image: url(http://www.domain.com/images/NameFromDataID.jpg);"></li>
I have tried to insert this inline code to insert the filename.
<%# "commonName" + Eval("ID") + ".jpg" %>
but it doesn’t work… I have an asp:ListView with many other things in it working, but I can’t seem to figure out how to get the data into the li style…
maybe I should be trying to build the entire style and then attach it to the li?
When you’re using Databind syntax, you need to enclose the entire attribute value inside the brackets.