Copied to clipboard

Flag this post as spam?

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


  • Justin Grimm 56 posts 138 karma points
    Mar 26, 2014 @ 18:18
    Justin Grimm
    0

    Creating Models, Surface Controllers, etc. on previous installation

    Hi,

    Complete MVC beginner. I've got an issue with a new Umbraco 7 site I got setup and running. Midway through development I realized you can not use user controls to post. So I did some research and found some articles detailing how to create an surface controllers and such within Umbraco. 

    Unfortunately, all of these start with creating a new project within Visual Studio. My project is already created and is more than half-way done. Any way to import an existing Umbraco installation into a new MVC project in VS?

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 26, 2014 @ 23:27
    Jan Skovgaard
    0

    Hi Justin

    You can easily create a project in visual studio and create the surface controllers you need and then use XCOPY to put the assemblies etc. to the correct folders of your current Umbraco project.

    So you have project A that builds to project B - Does that make sense? I think that could be an easy approach that does not need you to change your current VS project...I assume you created a VS project based on user control rather than MVC?

    Hope this makes sense :)

    /Jan

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Mar 27, 2014 @ 06:56
    Jeroen Breuer
    0

    Hello,

    If you want some surface controllers examples have a look at the Hybrid Framework. It's a v6 project, but it will work the same for v7.

    In v7 it's also possible to use User Controls, but not by default. V7 is by default in MVC mode, but you can change it to webforms. This blog explains how to go from webforms to MVC, but you can also use it to revert. http://umbraco.com/follow-us/blog-archive/2013/7/14/moving-from-webforms-to-mvc.aspx

    Jeroen

  • Justin Grimm 56 posts 138 karma points
    Mar 27, 2014 @ 16:45
    Justin Grimm
    0

    Thanks Jan & Jeroen!

Please Sign in or register to post replies

Write your reply to:

Draft