Copied to clipboard

Flag this post as spam?

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


  • Jakob Lithner 61 posts 264 karma points
    Mar 14, 2016 @ 21:26
    Jakob Lithner
    0

    MVC Controllers/Views context menus missing

    I have created an empty ASP.Net 4.5.x web application. Then I used Nuget to install Umbraco 7.4.1 and was then eager to define my own models, views and controllers. And no, I did NOT click Web Forms.

    The expected Views directory is there, but not the Controllers directory. I tried to add it manually, but then I don't get the usual Add Controller support in right click menus and dialogs. They are kind of nice ...

    Is there something wrong? Will everything in MVC still work? Can I fix it by configuration or installation?

    According to this link it might have something to do with project not being aware it is MVC: http://stackoverflow.com/questions/10540198/context-menu-to-add-controller-view-missing

    But the requested GUID is in place. Trying to update MVC package results in no action.

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Mar 15, 2016 @ 07:29
    Dennis Adolfi
    1

    This article about custom controllers could probobly be of help: https://our.umbraco.org/documentation/reference/routing/custom-controllers

    or this about SurfaceControllers: https://our.umbraco.org/documentation/reference/routing/surface-controllers

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 15, 2016 @ 09:44
    Dave Woestenborghs
    1

    Hi Jakob,

    I think you are talking about the option in Visual Studio.

    But the good news is that you don't need controllers to create a website in Umbraco.

    If you do need them for some reason the links Dennis posted are a good starting point.

    Dave

  • Jakob Lithner 61 posts 264 karma points
    Mar 17, 2016 @ 19:25
    Jakob Lithner
    0

    Thanks for links and suggestions. I have already listened to all Umbraco.tv videos. I do need a custom partial view for my content.

    I now tried to follow this video on creating partial views. It is very clear that he right clicks in Visual Studio to create controller and partial view. I can not do that! The menu option is not there.

    http://umbraco.tv/videos/developer/fundamentals/surface-controllers/setting-up-the-view/

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies