Design and CSS styles
Version 4.x > Design and CSS styles > Background-Image in a Table View modes: 
User avatar
Member
Member
ric.carrasquilla-ch2m - 3/20/2009 9:59:28 AM
   
Background-Image in a Table
Hi Everyone,

I’m trying to use a background image in my transformations. This is the code I use :

<table class="main" style="border:solid <%# Eval("Borderwidth") %>
<%# Eval("BorderColor") %>;
margin-left:20px;
width:100%; background-image:url(<%# IfEmpty(Eval("BackgroundImage"), "",GetImage("BackgroundImage") )%>" >
When the page displays, I get this as a result

" >
How can I use the transformation expression to display the background image? Also, is there a guide to all of the transformation expressions available? If so, where?

User avatar
Member
Member
ctaleck IPAGlobal - 3/25/2009 9:25:28 AM
   
RE:Background-Image in a Table
I suspect that GetImage("BackgroundImage") is not returning what you think. What does the HTML code source output look like? I would start there.

User avatar
Member
Member
ric.carrasquilla-ch2m - 3/26/2009 6:55:55 AM
   
RE:Background-Image in a Table
This is what I used.

<%# IfEmpty(Eval("BackgroundImage"),"","background-image:url(/CMSPages/GetFile.aspx?guid=" +Eval("BackgroundImage") +");") %>" >

Thanks for the help