Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've seen this error elsewhere but the soltuion does not work for me.
My v7 site has been working perfectly, i have the following code to render my home page banners.
@inherits UmbracoTemplatePage @{ var mediaFolderId = (int)CurrentPage.BannersMediaFolder; } @if (mediaFolderId > 0) { var mediaFolder = Umbraco.TypedMedia(mediaFolderId); var banners = mediaFolder.Children(x => x.DocumentTypeAlias == "Banner").ToList(); @foreach (var banner in banners) { var link = Umbraco.TypedContent(banner.GetPropertyValue("link")); @if (link != null) { } else { } @(banner.GetPropertyValue("headline")) @(banner.GetPropertyValue("linktext")) @Html.Raw(banner.GetPropertyValue("subheadline")) } <script src="/scripts/jquery.carouFredSel-6.2.1-packed.js" type="text/javascript"><!--mce:0--></script> <script type="text/javascript"><!--mce:1--></script> }
@Html.Raw(banner.GetPropertyValue("subheadline"))
<script src="/scripts/jquery.carouFredSel-6.2.1-packed.js" type="text/javascript"><!--mce:0--></script>
<script type="text/javascript"><!--mce:1--></script>
but now i get the Error: Object reference not set to an instance of an object. The only thing i have done is add another folder in my media folder...could this be connected?
Hi Stephen
At a quick glance the above code seems allright to me and as you say it has been working.
I'm wondering if the /App_Data/Logs file reveals some more information about the error?
/Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Error: Object reference not set to an instance of an object. V 7
I've seen this error elsewhere but the soltuion does not work for me.
My v7 site has been working perfectly, i have the following code to render my home page banners.
but now i get the Error: Object reference not set to an instance of an object. The only thing i have done is add another folder in my media folder...could this be connected?
Hi Stephen
At a quick glance the above code seems allright to me and as you say it has been working.
I'm wondering if the /App_Data/Logs file reveals some more information about the error?
/Jan
is working on a reply...