5/6/2014

Advanced Razor Development - Building a CRUD application using Razor in DNN - Part 1/2

 

9 min : 18 sec

Learn how to do advanced module development using the Module Creator and razor templates. We will cover database access, using razor helpers, view navigation, including custom assembled code, and more. This is part 1 of 2.

Advanced Razor

9 min : 18 sec

Learn how to do advanced module development using the Module Creator and razor templates. We will cover database access, using razor helpers, view navigation, including custom assembled code, and more. This is part 1 of 2.

Instructions:

1. Login as Host
2. Create a page
3. On the admin ribbon, select Modules > Create Module
4. Drop an instance of the Module Creator module onto the page
5. Enter the following settings:
- Owner Name: DotNetNuclear
- Module Name: RazorItem Demo
- Language: C#
- Template: Module - Razor
- Control Name: View
6. On the Module developer page, click the Add File tab and select the following:
- Language: C#
- Template: Module - Razor
- Control Name: Edit
- Control Type: Edit
7. You should now have a working and registered module in the /DesktopModules/DotNetNuclear/RazorItemDemo folder. Replace the _View.cshtml and _Edit.cshtml files in this folder with the ones in the RazorItemDemo.zip file.