Copied to clipboard

Flag this post as spam?

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


  • Joshua 3 posts 73 karma points
    Feb 27, 2019 @ 15:54
    Joshua
    0

    Object reference not set to an instance of an object

    I am completely new to Umbraco and I just created several new Content Nodes where I am trying to follow a sitemap. Now I get the following error:

    Object reference not set to an instance of an object

    @{
    Layout = "master.cshtml";
    var backgroundImage = Model.HeroBackgroundImage != null ? Model.HeroBackgroundImage.Url : String.Empty; }
    

    I began with the starterkit and now trying to go alone. Can anyone help me?

  • Alex Skrypnyk 6133 posts 23952 karma points MVP 7x admin c-trib
    Feb 28, 2019 @ 13:06
    Alex Skrypnyk
    0

    Hi Joshua

    Can you show all the code? It looks like Model is null in your code.

    Thanks,

    Alex

  • Joshua 3 posts 73 karma points
    Feb 28, 2019 @ 14:16
    Joshua
    0

    I solved the problem. Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft