One second. Whatever place your image is in on the server, the client can
get it only by url. So you have to provide the client with the url to the
image. It doesn't mean you have to export the image in a separate file. You
can make a page that will accept an image id as a parameter, get the image
from the resource and then stream it down to the client, in the way how
database-stored images get sent to clients. But as far as table cell setting
is concerned, you should do it in the way I suggested. The css rule can look
like
background-image : "getImage.aspx?id=1";
Eliyahu
"Shawn" <bo********@hotmail.com> wrote in message
news:u6**************@TK2MSFTNGP14.phx.gbl...
Thanks for quick answer!
The thing is that the background image is an embedded resource so I don't
think I can't use that method.
Do you know of another way?
Thanks,
Shawn
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:eI**************@TK2MSFTNGP15.phx.gbl... Shawn,
Make a css style with atribute background-image set to your image. Set
CssClass property for TableCell into the style name.
Eliyahu
"Shawn" <bo********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP12.phx.gbl... Hi.
I have an asp:table, like this:
<asp:Table runat="server" id="Table1">
<asp:TableRow Runat="server">
<asp:TableCell id="tc1" Runat="server"> </asp:TableCell>
<asp:TableCell id="tc2" Runat="server"> </asp:TableCell>
</asp:TableRow>
</asp:Table>
How can I add a background image to the TableCells from code behind?
Thanks,
Shawn