how to add image to the header ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 13 años
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
Hace 13 años
Try using the asp.net image control for the image like this:

<asp:image runat="server" alt="Banner Description" ImageUrl="~/images/banner.jpg" />
Hace 13 años
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.

.
Hace 13 años
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.