Copied to clipboard

Flag this post as spam?

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


  • Simon 692 posts 1068 karma points
    Sep 29, 2016 @ 14:27
    Simon
    0

    Unable to cast object of type "MyModel" to HomePage

    Hi Guys,

    I am experiencing an issue that when having a custom page model for home page, it throw the following error:

    enter image description here

    For the other pages/controllers, it works fine.

    Any idea would be much appreciated

    Thank you in advance.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 30, 2016 @ 09:22
    Jeroen Breuer
    0

    Hello,

    Are you using a new model on the homepage? If you are you should also use that model in the extension method which returns the homepage. Now you're casting to the wrong model.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft