Copied to clipboard

Flag this post as spam?

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


  • Sam 79 posts 426 karma points
    Nov 16, 2015 @ 16:53
    Sam
    0

    uSkySlider - Server error when using... Cannot perform runtime binding on a null reference

    Hello, I am trying to use the uSkySlider package. I followed the steps to intall the package, and created a doctype named slider, and has a datatype of uSky.Slider. I have also included all of the appropriate css and scripts. when I impliment the slider I get the following error

    Cannot perform runtime binding on a null reference Line 5: dynamic slider = @Model.Content.GetPropertyValue("slider"); Line 6:
    Line 7: decimal width = !string.IsNullOrEmpty(slider.width.Value) ? decimal.Parse(slider.width.Value) : 0; Line 8: decimal height = !string.IsNullOrEmpty(slider.height.Value.ToString()) ? decimal.Parse(slider.height.Value.ToString()) : 0; Line 9: decimal editorWidth = !string.IsNullOrEmpty(slider.editorWidth.Value.ToString()) ? decimal.Parse(slider.editorWidth.Value.ToString()) : width;

    Is there somthing I am missing? Please help.

  • AJS 31 posts 212 karma points
    Nov 24, 2015 @ 22:27
    AJS
    0

    Hi, I am getting the same error. Please let me know if you found the answer!

    Thanks.

  • Elliott Quick 8 posts 80 karma points
    May 06, 2016 @ 17:47
    Elliott Quick
    1

    Hey Everyone. I made the same mistake, see we followed the directions but some of the steps are easy to misinterpret if you are newer to Umbraco like myself.

    This issue occurs because we did not name the Property that we added to the page "slider".

    In the uSkySlider.cshtml (partial view) the line below show's the property it attempts to load.

    dynamic slider = @Model.Content.GetPropertyValue("slider");
    

    When I added the property to my home page I called it "Image Slider", so I changed that line in the cshtml to:

    dynamic slider = @Model.Content.GetPropertyValue("imageSlider");
    

    Hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft