guys, i need some help here regarding on the appearance of my background image for my table. i tried to place the image already inside the folder "WebApplication1" where my project is located but the image still is not visible in my table. im using the Mozilla Firefox as my browser in running my program.

example: C:\MyDocuments\MVS2008\Projects\WebApplication1

here is code:
<asp:Table ID = "tbl" runat = "server" BackImageUrl= "img.jpg" Font-Names= "Times New Roman" Font-Size= "12" GridLine= "Both" CellPadding= "10" CellSpacing= "5" HorizontalAlign= "Left" Width= "100%">

<asp:TableHeaderRow HorizontalAlig= "Left">
<asp:TableHeaderCell>Font Family</asp: TableHeaderCell>
<asp:TableHeaderCell Width= "80%">
Sample Text
</asp:TableHeaderCell>
</asp:TableHeaderRow>
</asp:Table>

The errors says " "img.jpg" cannot be find" even though its in the right folder already.

can you guys please give some suggestion on how i can fix this problem..
any replies will be fully appreciated! THANKS!!

Recommended Answers

All 2 Replies

You have one of the following issues.

if the compiler gives you an error : make sure you right click on the image and choose "include in project"

the path to your image might also be wrong, i recommend using "~/img.jpg"

please make sure you dont have an absolute path to the image. the path should be relative.

ABSOLUTE PATH : "C\Documents\wadawada....\img.jpg"
RELATIVE PATH : "~/img.jpg"

crazyvonzipper thanks alot for the advice... i really appreciate it... hope you can help me again if ever i have another problem in ASP.NET..

THANKS A LOT! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.