我想在我的主模板上顯示標題徽標。在IMG源屬性(Umbraco)中插入媒體url時出現CS1502錯誤
到目前爲止,我有這樣的代碼:
<h1 class="brand_name">
<a href="/"><img width="320px"
src='@(Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>
("headerLogo").Url)'>
</a>
</h1>
當我運行該頁面我收到此錯誤信息:
http://i.imgur.com/4RaL947.png
我不知道是什麼原因導致這個錯誤,因爲格式對我來說看起來很好。標題徽標的mediapicker屬性編輯器是以母版作爲其模板的語言文檔類型定義的。
我把代碼中的局部視圖來代替。當我運行這段代碼時,我得到了同樣的錯誤:@ item.GetPropertyValue(「headerLogo」)。Url – Leth