Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Html5EditorFor extension for MVC which allows to generate HTML 5 Input types, and add custom attributes in View
JavaScript C#
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Html5.Web
System.Web.Mvc.Html5
packages
.gitignore
MvcHtml5.sln
README.markdown

README.markdown

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

Something went wrong with that request. Please try again.