3 votes

This package 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

Package owner

Dan Diplo

Dan Diplo

Dan has 6205 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Dan Diplo
  • Created: 17/06/2012
  • Current version 1.0
  • .NET version 4.0
  • License MIT
  • Downloads on Our: 1.6K

External resources