Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ThomasBrunbjerg 90 posts 182 karma points
    Aug 21, 2017 @ 08:33
    ThomasBrunbjerg
    0

    CS1502 error when inserting media url in img source attribute

    I want to display a header logo on my master template.

    So far I have this code:

    <h1 class="brand_name">
        <a href="/"><img width="320px" src='@(Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("headerLogo").Url)'>
        </a>
    </h1>
    

    When i run the page i receive this error message:

    http://i.imgur.com/4RaL947.png

    I'm not sure what causes this error, as the formatting looks fine to me. The mediapicker property editor for the header logo is defined in a language document type, which has the master as its template.

Please Sign in or register to post replies

Write your reply to:

Draft