how to add image to the header ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi All,

I just want to add image to the header, when i add the following code the the header.ascx
  <img  src ="images/banner.jpg"  />
the image is then apear in the main page but when i navigate to any of the categories the images don't show and when i get the property for the image i found it : http://www.mywebsite.com/category/images/banner.jpg

What can i do in this problem ?

thanks all and kind regards
13 years ago
Try using the asp.net image control for the image like this:

<asp:image runat="server" alt="Banner Description" ImageUrl="~/images/banner.jpg" />
13 years ago
You need to specify the image's location relative to the root of the site instead of relative to the current directory since categories and products use rewritten (virtual) URLs.

Change your image tag to the following:
<img  src="/images/banner.jpg"  />

----
UPDATE

I didn't see that this was already answered, the solution offered by jnet works as well.

.
13 years ago
Thank you very much for the help , its working now :) thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.