+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / Root relative syntax

Root relative syntax

3 posts, 0 answered
  1. Gregg
    Gregg avatar
    7 posts
    Registered:
    02 Jun 2008
    12 Jun 2007
    Link to this post
    Hello,

    I am trying to anchor my graphics in the master page.  I am trying to put a root relative syntax in place so the graphics are always refered to in the right path.

    I have tried  ~/images/header1.jpg  and images/header1.jpg

    Does anyone know the correct syntax for the img src tag in the master page?

    Thank you.

  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    13 Jun 2007
    Link to this post
    Hello Ben,

    Your img tag should be formed in this way:

    <img src="~/Images/MainGalleryThumbs/thumbGal10.jpg" runat="server" alt="" />

    I suppose you have omitted runat="server", only with this attribute your image will be found if you are using tilde.

    Regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Gregg
    Gregg avatar
    7 posts
    Registered:
    02 Jun 2008
    13 Jun 2007
    Link to this post
    Perfect!  I did in fact forget the runat tag!
Register for webinar
3 posts, 0 answered