3 votes

This project is marked as retired

There's no reason for this in an MVC world! Only useful for old web-form Umbraco sites.

Diplo Razor Form

This package aims to show you an example of how you can create a form in Umbraco 4 using pure Razor scripting (i.e. doesn't require or rely on ASP.NET controls). The intention is to fulfill the following criertia:

 

  • The form must use both server-side and client-side validation.
  • It should utilise strongly-typed models to help prevent typo errors and provide full intellisense.
  • It musn't place any restrictions on mark-up or layout.
  • It should not require any dependency on ASP.NET web-forms (so no runat="server" or ViewState required).
  • It should use a simple, unintrusive "honey pot" method to deter spam bots.
  • It should prevent accidental re-submission of the form if the page is reloaded.
  • Our "business logic" should be separated form our presentation layer (as far as is possible) and be testable.

 

Whilst this is a fully working form (using a contact form as the example) it is NOT the intention for this package to provide an "out-of-the-box" solution. Instead, it is provided as an example you can learn some techniques and ideas from. It borrows (losely) some of the concepts from MVC to prove that Umbraco 4 can be used to build sites that don't use traditional web-forms concepts.

For a full explanation of how it works please check out my accompanying blog post: Creating an Umbraco Form using pure Razor at http://www.diplo.co.uk/blog/2012/5/24/creating-an-umbraco-form-using-pure-razor.aspx

 

 

Screenshots

Project owner

Dan Diplo

Dan Diplo

Dan has 4880 karma points

Project Compatibility

This project is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
7.12.x (untested)
7.11.x (untested)
7.10.x (untested)
7.9.x (untested)
7.8.x (untested)
7.7.x (untested)
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Project Information

  • Project owner: Dan Diplo
  • Created: 17/06/2012
  • Current version 1.0
  • .net Version 4.0
  • License MIT
  • Downloads: 3741

External resources