Copied to clipboard

Flag this post as spam?

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


  • Kenny Burns 173 posts 305 karma points
    Nov 22, 2012 @ 17:57
    Kenny Burns
    0

    Url Picker - Cannot perform runtime binding on a null reference

    Hi Guys,

    I have installed v5 on a 4.10.1 version of umbraco and I am having problems with the url picker. My code is as below:

    string contentItemLinkURL = string.Empty;
    contentItemLinkURL = panelItem.contentItemLinkURL.Url;
    Response.Write(panelItem.contentItemLinkURL.Url);

    I am getting a "Cannot perform runtime binding on a null reference" on the 2nd line of that code - even though the response.write writes out athe expected url. I have the data format as Json and Razor model binding is set to true.

    Am I missing something totally obvious?

    Thanks,

    Kenny

  • Kenny Burns 173 posts 305 karma points
    Nov 23, 2012 @ 10:05
    Kenny Burns
    1

    Update:

    Yeah, I was missing something totally obvious! I had added this to a doctype and was looping through some nodes and on one of the nodes I hadn't chosen/set a URL and or republished the page - hence the null reference! All sorted now. 

    (funny how if you go away from something you have pulled your hair out over, you get it within a couple of minutes the next time you look at it!!!)

    K

Please Sign in or register to post replies

Write your reply to:

Draft