Umbraco 7.6.4 Visual Studio 2017 - Where to add custom code for Workflow, Models, Controllers
I'm struggling to determine where to place my custom c# code under a Visual Studio 2017 umbraco 7.6.4 project for Workflow, Models, Controllers.
Local Environment:
Win7, IIS7.5, VS2017, Sql Server 2014.
Creating a new 'ASP.NET Web Application (.NET Framework) 4.5.2' as an empty Template - with no folder references for MVC or Web Forms.
Then I pull Umbraco from nuget Install-Package UmbracoCms -Version 7.6.4
Configure Umbraco to use a local Sql Server 2014 db with Integrated Authentication
Then I build / run and the site works fine.
Issues:
I need to capture some sensitive data and would like to create a custom Umbraco Forms Workflow so I can encrypt the data and prevent it from being saved in default plain text manner. I can't figure out where I put my c# code so that the workflow becomes available in the workflow.
I've also tried to add a custom model and custom controller to try to roll my own form but have received errors - either that the model or controller get created twice or have multiple routes (when I put in App_Code) or that the Model isn't found by the .cshtml file.
Alex,
Thank you for your reply. I'm confused on the best starting point. Should I use a default Web Application as described in this install guide (http://www.paulrgriffiths.co.uk/blog/installing-umbraco-7-part-1-setting-up-visual-studio/) or start with an asp.net MVC project?
As a test I was just able to create an App_Code folder and placed a Model and Controller in it and updated a Template and Partial View per these instructions and was able to see the form rendered to the page. (https://github.com/kgiszewski/LearnUmbraco7/blob/master/Chapter%2007%20-%20Forms/01%20-%20Integrating%20Umbraco%20with%20MVC%20Forms.md)
I have a Published version of Umbraco (7.4.2) from a client to add / modify some additional features over it.
Could you suggest how to proceed without the actual source code. For Instance, I need to modify a form by adding a new field and make it work with the existing form.
Is that possible as above or I should recreate the complete form.
The way to do it - download all the files and open the site as Website in visual studio, and you are able to work with all the code that isn't compiled to dll. Usually, it's enough for making a lot of changes, but of course better to have full source code
I need to modify a form by adding new fields and make it work with the existing form. Is that possible as above or I should recreate the complete form from beginning. Forms are developed using MVC Code and not umbraco forms
Umbraco 7.6.4 Visual Studio 2017 - Where to add custom code for Workflow, Models, Controllers
I'm struggling to determine where to place my custom c# code under a Visual Studio 2017 umbraco 7.6.4 project for Workflow, Models, Controllers.
Local Environment:
Install-Package UmbracoCms -Version 7.6.4
Then I build / run and the site works fine.
Issues:
Starting Point in VS
Any help would be appreciated!
Do not use App_Code if you are using Web Application project type.
Use Controllers, Models and any folders you want, all c# code will be compiled to dll.
Alex, Thank you for your reply. I'm confused on the best starting point. Should I use a default Web Application as described in this install guide (http://www.paulrgriffiths.co.uk/blog/installing-umbraco-7-part-1-setting-up-visual-studio/) or start with an asp.net MVC project?
As a test I was just able to create an App_Code folder and placed a Model and Controller in it and updated a Template and Partial View per these instructions and was able to see the form rendered to the page. (https://github.com/kgiszewski/LearnUmbraco7/blob/master/Chapter%2007%20-%20Forms/01%20-%20Integrating%20Umbraco%20with%20MVC%20Forms.md)
Hi Jay
I like to use an empty web application, MVC will be installed with Umbraco via nuget, it's easy.
Thanks,
Alex
Mr. Alex,
I have a Published version of Umbraco (7.4.2) from a client to add / modify some additional features over it.
Could you suggest how to proceed without the actual source code. For Instance, I need to modify a form by adding a new field and make it work with the existing form.
Is that possible as above or I should recreate the complete form.
Thanks
Hi Ajju
The way to do it - download all the files and open the site as Website in visual studio, and you are able to work with all the code that isn't compiled to dll. Usually, it's enough for making a lot of changes, but of course better to have full source code
Alex
Thanks Mr. Alex,
I need to modify a form by adding new fields and make it work with the existing form. Is that possible as above or I should recreate the complete form from beginning. Forms are developed using MVC Code and not umbraco forms
I am very new to Umbraco and .NET platform.
is working on a reply...