Copied to clipboard

Flag this post as spam?

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


  • Jack 2 posts 72 karma points
    Aug 09, 2019 @ 09:33
    Jack
    0

    LeBlender PartialView cannot bind the custom model

    Hi,

    I have created a LeBlender item in Umbraco and setup the view and controller for it, but when I try and inherit from my own custom model, I get the following error:

    Cannot bind source type Lecoati.LeBlender.Extension.Models.LeBlenderModel to model type myCustomModel.

    my inherits code:

    @inherits UmbracoViewPage<myCustomModel>
    

    The partial works fine when i use the following return in the controller:

    return View(myCustomModel);
    

    But when i return a partial view, I get the error. I don't want to use a full view as it inserts the header and footer in the partial, but I still want to use my custom model instead of the LeBlender one.

    If anyone has any ideas for this, it would be appreciated.

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft