Templated Helper Methods

1、Model

image

 

2、HomeController

image

3、CreatePerson.cshtml

image

禁用了客户端验证

4、Using Templated Helper Methods

image

Editor 和 EditorFor 是一样的,唯一的区别是EditorFor有只能提示,可以防止输入错误(?)

 

    The type attribute specifies which kind of input element should be displayed by the browser. The helper methods have
specified the number and datetime types for the PersonId and BirthDate properties and the text type, which
is the default for the other properties. The reason that we only see these types in Opera is because the HTML5 features are still not
widely supported, even in the latest version of Internet Explorer and Chrome.

posted @ 2014-07-06 22:10  秋意了了  阅读(192)  评论(0编辑  收藏  举报