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;
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.
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.
Hi, I am getting the same error. Please let me know if you found the answer!
Thanks.
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.
When I added the property to my home page I called it "Image Slider", so I changed that line in the cshtml to:
Hope this helps.
is working on a reply...