0

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!!

Edited by butz17: forgot to post an information

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by butz17
0

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"

0

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! :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.