Gutek / MVC-3-Html5EditorFor

Html5EditorFor extension for MVC which allows to generate HTML 5 Input types, and add custom attributes in View

Home Page:http://blog.gutek.pl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Html5EditorFor

Html5EditorFor is an extension of default MVC 3 EditorFor, which allows to:

  • Use custom attributes in View: Html.Html5EditorFor(model => model, null, attributes: new { style = "font-weight: bold" })
  • Generate [HTML 5 Input type] (http://www.w3schools.com/html5/html5_form_input_types.asp) based on:
  • type of the property (int, float, double etc.)
  • DataType attribute form System.ComponentModel.DataAnnotations
  • using custom Html5*Attribute from library over ViewModel

Additionally, it extends default input classes to include 'numeric-int' for not decimal numbers and 'numeric-float' for decimal numbers. This allows to use jQuery plugin like numeric i.e.: $('.numeric-int').numeric()

Code on github contains:

  • Source code for Html5EditorFor
  • Sample web site

Library is available on NuGet

Description

Description is available in Polish here, English translation by Google

About

Html5EditorFor extension for MVC which allows to generate HTML 5 Input types, and add custom attributes in View

http://blog.gutek.pl


Languages

Language:JavaScript 96.1%Language:C# 3.9%Language:ASP 0.0%